CN111930614A - Automatic testing method, device, equipment and medium - Google Patents

Automatic testing method, device, equipment and medium Download PDF

Info

Publication number
CN111930614A
CN111930614A CN202010707308.5A CN202010707308A CN111930614A CN 111930614 A CN111930614 A CN 111930614A CN 202010707308 A CN202010707308 A CN 202010707308A CN 111930614 A CN111930614 A CN 111930614A
Authority
CN
China
Prior art keywords
data
test
response
page
user operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010707308.5A
Other languages
Chinese (zh)
Other versions
CN111930614B (en
Inventor
胡文峰
刘远宏
方俊标
殷晓梅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202010707308.5A priority Critical patent/CN111930614B/en
Publication of CN111930614A publication Critical patent/CN111930614A/en
Application granted granted Critical
Publication of CN111930614B publication Critical patent/CN111930614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses an automatic testing method, a device, equipment and a medium, wherein the method comprises the following steps: the method comprises the steps that a test server obtains combined data of a page to be tested, which is sent by a client, wherein the combined data comprises user operation data input by the client and response data of background services received by the client to the user operation data, the test server processes the user operation data to generate a test sample of the page to be tested, the test server processes the response data to obtain simulation data corresponding to the test sample, and the test server automatically tests the page to be tested according to the test sample and the simulation data to obtain a test result. According to the method, the accuracy and the effectiveness of the automatic test are improved by reproducing the operation of the user, the efficiency of the automatic test is improved, and a developer can have the capability of remotely positioning the problem of the user.

Description

Automatic testing method, device, equipment and medium
Technical Field
The invention relates to the field of automatic testing, in particular to an automatic testing method, device, equipment and medium.
Background
Automated testing is a process that translates human-driven test behavior into machine execution. Typically, after a test case is designed and passed for review, tests are performed step by a tester according to the procedures described in the test case, resulting in a comparison of actual results with expected results.
In the prior art, a test sample needs to be written manually, and although the flow part of the test sample is largely the same and different, codes need to be copied and modified continuously to meet the needs of different projects. The test samples also change together in the process of project iteration, and time and energy are consumed for continuous maintenance.
In the software testing process, the scheme of forming the test sample after the atomic operation is extracted from the operation is used in the testing stage, and the test sample which is strange and does not accord with the operation habit of the user can appear, so that a plurality of invalid test samples exist.
Disclosure of Invention
The invention provides an automatic test method, device, equipment and medium, which can improve the accuracy and effectiveness of automatic test, improve the efficiency of automatic test and solve the problem that a developer can remotely position a user terminal.
In one aspect, the present invention provides an automated testing method, comprising:
acquiring combined data of a page to be tested, wherein the combined data comprises user operation data input by a client and response data of background service received by the client to the user operation data;
processing the user operation data to generate a test sample of the page to be tested;
processing the response data to obtain simulation data corresponding to the test sample;
and automatically testing the page to be tested according to the test sample and the simulation data to obtain a test result.
Another aspect provides an automated testing apparatus, the apparatus comprising: the device comprises a combined data acquisition module, a test sample generation module, a simulation data acquisition module and an automatic test module;
the combined data acquisition module is used for acquiring combined data of a page to be tested, which is sent by a client, wherein the combined data comprises user operation data input by the client and response data of background service received by the client to the user operation data;
the test sample generation module processes the user operation data to generate a test sample of a page to be tested;
the simulation data obtaining module is used for processing the response data to obtain simulation data corresponding to the test sample;
and the automatic test module is used for carrying out automatic test on the page to be tested according to the test sample and the simulation data to obtain a test result.
Another aspect provides an electronic device, which includes a processor and a memory, where at least one instruction or at least one program is stored in the memory, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an automated testing method as described above.
Another aspect provides a computer storage medium comprising a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement an automated testing method as described above.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various alternative implementations of the automated testing aspect described above.
The method comprises the steps of obtaining user operation data and response data from a client and a background server, converting the user operation data into a test sample in a test server, and converting the response data into simulation data. When the client requests the test sample, the test sample is sent to the client, and when the test sample is executed at the client, the corresponding simulation data is sent to the client. And comparing the current response data of the client with the simulation data obtained when the client executes the test sample to obtain the result of the automatic test. According to the method, the accuracy and the effectiveness of the automatic test are improved by reproducing the operation of the user, the efficiency of the automatic test is improved, and a developer can have the capability of remotely positioning the problem of the user.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of an automated testing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of an automated testing method according to an embodiment of the present invention;
fig. 3 is a flowchart of a test sample for generating a page to be tested in an automated testing method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for converting user operation data into a test sample in an automated testing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating obtaining simulation data in an automated testing method according to an embodiment of the present invention;
fig. 6 is a flowchart illustrating determining response path information in an automated testing method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating an automated testing process performed in an automated testing method according to an embodiment of the present invention;
FIG. 8 is a schematic diagram illustrating data transmission for an automated test performed by a collector and a determiner according to an embodiment of the invention;
fig. 9 is a flowchart illustrating image comparison in an automated testing method according to an embodiment of the present invention;
FIG. 10 is a flowchart illustrating page status comparison in an automated testing method according to an embodiment of the present invention;
fig. 11 is a schematic diagram of information transmission of interaction among a client, a background server and a test server in an automated testing method according to an embodiment of the present invention;
FIG. 12 is a schematic structural diagram of an automatic test apparatus according to an embodiment of the present invention;
fig. 13 is a schematic hardware structure diagram of an apparatus for implementing the method provided in the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Moreover, the terms "first," "second," and the like, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
Referring to fig. 1, an application scenario diagram of an automated testing method according to an embodiment of the present invention is shown, where the application scenario includes a user terminal 110, a background server 120, and a testing server 130, and when the user terminal 110 interacts with the background server 120, response data sent by the background server 120 is obtained, and user operation data and response data input by the user terminal 110 in a page to be tested are combined into combined data, which is uploaded to the testing server 130. The test server 130 generates a test sample according to the user operation data, and processes and stores the response data to obtain the simulation data. When the automatic test is performed, the page to be tested is automatically tested through the test sample and the simulation data in the test server 130, and a test result is obtained.
In the embodiment of the present invention, the background server 120 performing the background service and the test server 130 performing the test may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, a cloud storage, a network service, cloud communication, a middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform. The terminal may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the application is not limited herein.
In the embodiment of the present invention, the user terminal 110 includes a physical device of a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, a smart wearable device, and the like, and may also include software running in the physical device, such as an application program. The operating system running on the network node in the embodiment of the present application may include, but is not limited to, an android system, an IOS system, linux, Unix, windows, and the like. The User terminal 120 includes a UI (User Interface) layer.
Referring to fig. 2, an automated testing method, which can be applied to a server side, is shown, and the method includes:
s210, acquiring combined data of a page to be tested, wherein the combined data comprises user operation data input by a client and response data of background service received by the client to the user operation data;
s220, processing the user operation data to generate a test sample of the page to be tested;
further, referring to fig. 3, processing the user operation data to generate a test sample of a page to be tested includes:
s310, determining a current language frame template;
and S320, inputting the user operation data in the current language framework template to generate a test sample corresponding to the current language.
Specifically, referring to fig. 4, fig. 4 shows a process of converting user operation data into a test sample. And in the process of operating the program, the client records the user operation data, combines the user operation data and the response data into combined data and sends the combined data to the test server. The client side can also transmit the combined data to the background server, and the combined data is forwarded to the test server through the background server. And the test server acquires the user operation data in the combined data through the program interface, and converts the user operation data into a test sample matched with a preset language according to a preset language framework template. For example, if the frame selected by the user is a test frame of the headless browser type, the user operation data may be populated from the test frame of the headless browser, thereby generating a test sample that matches the test frame of the headless browser. If the frame selected by the user is a nightmare frame, and the nightmare frame is a frame for webpage automated testing, when the test sample is generated, user operation data can be filled according to the nightmare frame, so that the test sample matched with the test frame of the nightmare is generated.
When generating the test sample, the command line tool (x-test-cli) can be used to execute the function of compiling the user operation data into the test sample and outputting the test sample after inputting the preset language frame template.
By converting the user operation data into the test sample, a specific automatic test framework is not restricted, and the test sample can be converted into a test sample of other languages only by providing a specific language framework template by a developer, so that the method has good multi-language framework adapting capability.
S230, processing the response data to obtain simulation data corresponding to the test sample;
further, referring to fig. 5, the processing the response data to obtain the simulation data corresponding to the test sample includes:
s510, performing link analysis on the response data, and determining response path information of each response result in the response data;
s520, determining user operation requests in the user operation data matched with the response results in the response data according to the response path information;
s530, storing each response result in the response data corresponding to the user operation request to obtain the simulation data.
Specifically, the combined data that the client combines and reports to the test server may adopt the following format: locationRecord [ { … } ], vuex Record [ { … } ], tapReacord [ { … }, { … }, { … }, { … } ], apiRecord [ { … }, { … }, { … } ] and the like, wherein locationRecord is a client local record, vyxRecord is a page state record, tapReard is a page jump record, and apiRecord is an application program interface record. The test server can perform link analysis on data of the apiRecord, determine user operation requests corresponding to all response results, and store the analysis results corresponding to all the user operation requests on the test server.
Referring to fig. 6, the link parsing the response data and determining the response path information of each response result in the response data includes:
s610, acquiring program interface information corresponding to each response result in the response data;
s620, according to the program interface information, determining response path information of each response result in the response data.
The test server can obtain response data from the application program interface, so that the response data can be corresponding to each application data interface and corresponding to a user operation request, for example, the user requests to perform payment operation, the response data should jump to a payment page to wait for payment of the user, and after the test server obtains the response data of the jump from the application data interface of the corresponding payment program, the response result of the jump to the payment page can be associated with the operation request of the user for payment and stored as simulation data on the test server. And subsequently running the test sample, determining a response result of jumping to a payment page corresponding to the payment operation according to the simulation data stored in the test server when the payment operation is executed in the test sample, sending the simulation data to the client, and executing the automatic test.
Corresponding response data are stored corresponding to real user operation, the user operation can be better reproduced, the operation process does not need to be confirmed by the user, the accuracy and the effectiveness of the automatic test are improved, the efficiency of the automatic test is improved, and a developer has the capability of remotely positioning the user.
And S240, automatically testing the page to be tested according to the test sample and the simulation data to obtain a test result.
Further, referring to fig. 7, the performing an automated test on the page to be tested according to the test sample and the simulation data to obtain a test result includes:
s710, acquiring current user operation data and current response data of a page to be tested in the client;
s720, responding to a test sample acquisition request of the client, and sending a target test sample corresponding to the current user operation data to the client;
s730, responding to the operation that the target test sample is operated by the client, and sending target simulation data corresponding to the target test sample to the client;
and S740, comparing the current response data with the target simulation data to obtain a test result.
Specifically, referring to fig. 8, fig. 8 shows the results of the automated testing by the collector and the judger. The client collects user operation data and response data through each collector, wherein the collectors can comprise a program interface recording plug-in, a user click recording plug-in, a page jump recording plug-in, a page state recording plug-in and other plug-ins for recording data and the like, the combined data is combined into combined data, and the combined data is sent to a test server through the combined data recording plug-in to form a test sample and simulation data. The test server can obtain the current user operation data and the current response data of the page to be tested in the client through the collector, and determine a target test sample corresponding to the current user operation data based on the current user operation data. And according to a test sample acquisition request sent by the client, sending a target test sample corresponding to the current user operation data to the client, when the client executes the target test sample, sending the stored target simulation data corresponding to the target test sample to the client by the test server, and reproducing a corresponding response result when the client executes each user operation to complete the automatic test. And comparing the current response data of the client with the target simulation data through the judger to obtain a test result, so that the position of a problem in the current operation of the client can be determined.
For example, when a user receives a telephone charge ticket on line, the background server records data of successful receipt of the telephone charge ticket, the current user operation at this time is to receive the telephone charge ticket, the current response data is to receive the telephone charge ticket successfully, when simulation is performed through a test sample, the user executes operation of receiving the telephone charge ticket in the test sample, and the test server sends simulation data of successful receipt of the telephone charge ticket to the client so as to simulate current operation data and current response data of the user.
Because the user obtains the simulation data from the test server when executing the test, and the data obtained by the collector and the judger are fed back to the simulation data and do not pass through the background server, the problem of changing the real data state of the user when executing the test can be avoided.
Further, referring to fig. 9, the comparing the current response data with the target simulation data to obtain a test result includes:
s910, acquiring an actual page image after user operation in the current response data according to a preset image acquisition component;
s920, acquiring a test page image after user operation in the target simulation data according to a preset image acquisition component;
s930, comparing the actual page image with the test page image according to a preset image comparison component to obtain a test result.
Specifically, when the user performs a click operation and the page responds and jumps, the current response data and the target simulation data can be compared through the image collector and the corresponding image judger to obtain a test result. The image collector can collect the page image before the user clicks and the page image after the user clicks and jumps. The image judger can acquire the page image before the user clicks and the page image after the user clicks in the target simulation data, and the page image before the user clicks and the page image after the user clicks in the current response data, compare whether the corresponding page images after the user clicks are similar or not, and if the difference exists, the image jumping link is proved to have problems.
Further, referring to fig. 10, the comparing the current response data with the target simulation data to obtain a test result includes:
s1010, acquiring actual page structure data in the current response data according to a preset page state acquisition assembly;
s1020, acquiring test page structure data in the target simulation data according to a preset page state acquisition assembly;
and S1030, comparing the actual page structure data with the test page structure data according to a preset page state comparison component to obtain a test result.
Specifically, if the page state changes, the comparison between the current response data and the target simulation data, such as the Vuex collector and Vuex comparator, can be performed through the page state collector and the corresponding page state judger. Vuex is a state management schema developed specifically for vue. It uses the state of all the components of the centralized storage management application and guarantees that the state changes in a predictable way with corresponding rules, and can save the common state (state), callback function (mutation), etc.
The page state collector may collect a page structure before the user operation and a page structure after the user operation. The page state comparator can acquire the page structure before the user operation and the page structure after the user operation in the target simulation data, and the page structure before the user operation and the page structure after the user operation in the current response data, compare the page structures before and after the corresponding user operation, and determine whether the page structure is changed in the user operation at the step, so that problems occur.
Further, in the embodiment of the present invention, the collector and the judger are not limited, and the collector and the judger can perform corresponding collecting operation and judging operation in the form of plug-in, so that customized development can be performed, and based on the requirement of the automated test, an appropriate collector and judger are selected, so that the flexibility of the automated test is improved, and the automated test can be performed from each dimension.
In a specific embodiment, the method can be applied to the problem that it is difficult to locate in the software that is remotely confirmed to be on-line, please refer to fig. 11, and fig. 11 is a schematic diagram showing the interaction among the client, the background server and the testing server.
S1100, a client sends a user operation request to a background server;
s1110, based on the user operation request, the background server sends response data to the client;
s1120, recording user operation data by the client;
s1130 combines the user operation data and the response data to obtain combined data;
s1140, the client sends the combined data to a test server;
s1150, the test server converts the response data into analog data;
s1160, converting user operation data in the combined data into a test sample by the test server and outputting the test sample;
s1170 the test server replies processing results of the slave test sample and the simulation data to the client;
s11801, the client requests a test sample to the server;
s11802, responding to the operation that the client requests the test sample from the test server, the test server sends the target test sample to the client;
s11901, the client executes the target test sample and requests the simulation data from the test server;
and S11902, responding to the operation of the client executing the target test sample, and sending the corresponding target simulation data to the client by the test server.
Specifically, when a user enters an online program for the first time through a client, the client can send a user operation request to a background server, the background server responds to the user operation request and sends response data to the client, and the client combines the user operation data and the response data to form combined data and uploads the combined data to a test server. In the test server, the test server converts the user operation data into test samples, processes the response data, and stores the response data corresponding to each user operation request in the test server to obtain the simulation data. When the client runs the on-line program and a problem occurs and a worker at the background server side cannot locate the problem, the test server can acquire the current user operation and the current response data executed by the client through the collector. The client can request a test sample from the test server, the test server determines a target test sample corresponding to the current operation of the user and sends the target test sample to the client, when the client executes the target test sample, the test server sends target simulation data corresponding to the user operation in the target test sample to the client, the user operation and the target simulation data in the test sample can be collected through the collector, the current user operation and the user operation in the test sample are compared through the judger, the current response data and the target simulation data are compared, a test result is obtained, and a place with a problem in software is located.
Alternatively, the system can be improved to simulate the real operation of the user to generate simulation data, so as to carry out automatic testing. The simulation data generated based on the real operation can provide data simulation from the development stage, and the development efficiency is improved.
The embodiment of the invention provides an automatic testing method, which comprises the following steps: the method comprises the steps of obtaining user operation data and response data from a client and a background server through three-party interaction of the client, the background server and a test server, converting the user operation data into a test sample in the test server, and converting the response data into simulation data. When the client requests the test sample, the test sample is sent to the client, and when the test sample is executed at the client, the corresponding simulation data is sent to the client. And comparing the current response data of the client with the simulation data obtained when the client executes the test sample to obtain the result of the automatic test. The method reproduces the operation of the user, improves the accuracy and the effectiveness of the automatic test, improves the efficiency of the automatic test, and enables the developer to have the capability of remotely positioning the problem of the user. The method can select a proper collector and a proper judger based on the requirement of the automatic test, improves the flexibility of the automatic test, and can carry out the automatic test from all dimensions.
An embodiment of the present invention further provides an automatic testing apparatus, please refer to fig. 12, and on the other hand, an automatic testing apparatus is provided, the apparatus includes: the test system comprises a combined data acquisition module 1210, a test sample generation module 1220, a simulation data acquisition module 1230 and an automatic test module 1240;
the combined data acquiring module 1210 is configured to acquire combined data of a page to be tested, where the combined data includes user operation data input by a client and response data of a background service received by the client to the user operation data, and the combined data is sent by the client;
the test sample generating module 1220 processes the user operation data to generate a test sample of a page to be tested;
the simulation data obtaining module 1230 is configured to process the response data to obtain simulation data corresponding to the test sample;
the automatic test module 1240 is configured to perform an automatic test on the page to be tested according to the test sample and the simulation data to obtain a test result.
Further, the test sample generating module 1220 further includes a frame template obtaining unit and an operation data converting unit;
the frame template obtaining unit is used for determining a current language frame template;
the operation data conversion unit is used for inputting the user operation data in the current language framework template and generating a test sample corresponding to the current language.
Further, the analog data obtaining module 1230 includes a response path obtaining unit, a response result matching unit, and a data storage unit;
the response path acquisition unit is used for performing link analysis on the response data and determining response path information of each response result in the response data;
the response result matching unit is used for determining the user operation requests in the user operation data matched with the response results in the response data according to the response path information;
the data storage unit is used for storing each response result in the response data corresponding to the user operation request to obtain the simulation data.
Further, the response path acquiring unit includes a program interface information acquiring unit and a response path determining unit:
the program interface information acquisition unit is used for acquiring program interface information corresponding to each response result in the response data;
the response path determining unit is configured to determine response path information of each response result in the response data according to the program interface information.
Further, the automatic test module 1240 includes a current data obtaining unit, a target test sample determining unit, a target simulation data determining unit and a data comparing unit;
the current data acquisition unit is used for acquiring current user operation data and current response data of a page to be tested in the client;
the target test sample determining unit is used for responding to a test sample acquiring request of the client and sending a target test sample corresponding to the current user operation data to the client;
the target simulation data determining unit is used for responding to the operation of the client for running the target test sample and sending target simulation data corresponding to the target test sample to the client;
the data comparison unit is used for comparing the current response data with the target simulation data to obtain a test result.
Further, the data comparison unit includes an image data comparison unit, a page structure data comparison unit, and the like. The image comparison unit comprises an actual page acquisition unit, a test page acquisition unit and a page image comparison unit;
the actual page acquisition unit is used for acquiring an actual page image after user operation in the current response data according to a preset image acquisition component;
the test page acquisition unit is used for acquiring a test page image after user operation in the target simulation data according to a preset image acquisition component;
the page image comparison unit is used for comparing the actual page image with the test page image according to a preset image comparison component to obtain a test result.
The page structure data comparison unit comprises an actual page structure acquisition unit, a test page structure acquisition unit and a page structure comparison unit
The actual page structure acquisition unit is used for acquiring actual page structure data in the current response data according to a preset page state acquisition component;
the test page structure acquisition unit is used for acquiring test page structure data in the target simulation data according to a preset page state acquisition component;
the page structure comparison unit is used for comparing the actual page structure data with the test page structure data according to a preset page state comparison component to obtain a test result.
The device provided in the above embodiments can execute the method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. For technical details that are not described in detail in the above embodiments, reference may be made to an automated testing method provided in any embodiment of the present invention.
The present embodiment also provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are loaded by a processor and execute an automated testing method of the present embodiment.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the methods provided in the various alternative implementations of the automated testing aspect described above.
The present embodiment also provides an electronic device, which includes a processor and a memory, where the memory stores a computer program, and the computer program is adapted to be loaded by the processor and execute the automated testing method of the present embodiment.
The device may be a computer terminal, a mobile terminal or a server, and the device may also participate in forming the apparatus or system provided by the embodiments of the present invention. As shown in fig. 13, the server 13 (or computer terminal 13 or mobile terminal 13) may include one or more (shown with 1302a, 1302b, … …, 1302 n) processors 1302 (the processors 1302 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1304 for storing data, and a transmission device 1306 for communication functions. Besides, the method can also comprise the following steps: a display, an input/output interface (I/O interface), a network interface, a power source, and/or a camera. It will be understood by those skilled in the art that the structure shown in fig. 13 is only an illustration and is not intended to limit the structure of the electronic device. For example, server 13 may also include more or fewer components than shown in FIG. 13, or have a different configuration than shown in FIG. 13.
It should be noted that the one or more processors 1302 and/or other data processing circuitry described above may be referred to generally herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part in software, hardware, firmware, or any combination thereof. Furthermore, the data processing circuit may be a single stand-alone processing module, or incorporated in whole or in part into any of the other elements in the server 13 (or computer terminal). As referred to in the embodiments of the application, the data processing circuit acts as a processor control (e.g. selection of a variable resistance termination path connected to the interface).
The memory 1304 may be used to store software programs and modules of application software, such as program instructions/data storage devices corresponding to the method described in the embodiment of the present invention, and the processor 1302 executes various functional applications and data processing by running the software programs and modules stored in the memory 1304, that is, implementing one of the above-described methods for generating a self-attention-network-based time-series behavior capture block. The memory 1304 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 1304 may further include memory remotely located from the processor 1302, which may be connected to the server 13 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 1306 is used for receiving or transmitting data via a network. The above-described specific example of the network may include a wireless network provided by a communication provider of the server 13. In one example, the transmission device 1306 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmitting device 1306 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
The display may be, for example, a touch screen type Liquid Crystal Display (LCD) that may enable a user to interact with a user interface of the server 13 (or computer terminal).
The present specification provides method steps as described in the examples or flowcharts, but may include more or fewer steps based on routine or non-inventive labor. The steps and sequences recited in the embodiments are but one manner of performing the steps in a multitude of sequences and do not represent a unique order of performance. In the actual system or interrupted product execution, it may be performed sequentially or in parallel (e.g., in the context of parallel processors or multi-threaded processing) according to the embodiments or methods shown in the figures.
The configurations shown in the present embodiment are only partial configurations related to the present application, and do not constitute a limitation on the devices to which the present application is applied, and a specific device may include more or less components than those shown, or combine some components, or have an arrangement of different components. It should be understood that the methods, apparatuses, and the like disclosed in the embodiments may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a division of one logic function, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or unit modules.
Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An automated testing method, the method comprising:
acquiring combined data of a page to be tested, wherein the combined data comprises user operation data input by a client and response data of background service received by the client to the user operation data;
processing the user operation data to generate a test sample of the page to be tested;
processing the response data to obtain simulation data corresponding to the test sample;
and automatically testing the page to be tested according to the test sample and the simulation data to obtain a test result.
2. The automated testing method of claim 1, wherein the processing the user operation data to generate the test sample of the page to be tested comprises:
determining a current language framework template;
and inputting the user operation data in the current language framework template to generate a test sample corresponding to the current language.
3. The automated testing method of claim 1, wherein the processing the response data to obtain simulation data corresponding to the test sample comprises:
performing link analysis on the response data, and determining response path information of each response result in the response data;
determining a user operation request in the user operation data matched with each response result in the response data according to the response path information;
and storing each response result in the response data corresponding to the user operation request to obtain the simulation data.
4. The automated testing method of claim 3, wherein the link parsing the response data and determining the response path information of each response result in the response data comprises:
acquiring program interface information corresponding to each response result in the response data;
and determining response path information of each response result in the response data according to the program interface information.
5. The automated testing method of claim 1, wherein the automated testing of the page to be tested according to the test sample and the simulation data to obtain a test result comprises:
acquiring current user operation data and current response data of a page to be tested in the client;
responding to a test sample acquisition request of the client, and sending a target test sample corresponding to the current user operation data to the client;
responding to the operation of the client for running the target test sample, and sending target simulation data corresponding to the target test sample to the client;
and comparing the current response data with the target simulation data to obtain a test result.
6. The automated testing method of claim 5, wherein comparing the current response data with the target simulation data to obtain a test result comprises:
acquiring an actual page image after user operation in the current response data according to a preset image acquisition component;
acquiring a test page image after user operation in the target simulation data according to a preset image acquisition component;
and comparing the actual page image with the test page image according to a preset image comparison component to obtain a test result.
7. The automated testing method of claim 5, wherein comparing the current response data with the target simulation data to obtain a test result comprises:
acquiring actual page structure data in the current response data according to a preset page state acquisition assembly;
acquiring test page structure data in the target simulation data according to a preset page state acquisition assembly;
and comparing the actual page structure data with the test page structure data according to a preset page state comparison component to obtain a test result.
8. An automated testing apparatus, the apparatus comprising: the device comprises a combined data acquisition module, a test sample generation module, a simulation data acquisition module and an automatic test module;
the combined data acquisition module is used for acquiring combined data of a page to be tested, wherein the combined data comprises user operation data input by a client and response data of background service received by the client to the user operation data;
the test sample generation module processes the user operation data to generate a test sample of a page to be tested;
the simulation data obtaining module is used for processing the response data to obtain simulation data corresponding to the test sample;
and the automatic test module is used for carrying out automatic test on the page to be tested according to the test sample and the simulation data to obtain a test result.
9. An electronic device comprising a processor and a memory, wherein at least one instruction or at least one program is stored in the memory, and wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement an automated testing method according to any one of claims 1-7.
10. A storage medium comprising a processor and a memory, wherein the memory has stored therein at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement an automated testing method according to any one of claims 1-7.
CN202010707308.5A 2020-07-20 2020-07-20 Automatic testing method, device, equipment and medium Active CN111930614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010707308.5A CN111930614B (en) 2020-07-20 2020-07-20 Automatic testing method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010707308.5A CN111930614B (en) 2020-07-20 2020-07-20 Automatic testing method, device, equipment and medium

Publications (2)

Publication Number Publication Date
CN111930614A true CN111930614A (en) 2020-11-13
CN111930614B CN111930614B (en) 2021-07-16

Family

ID=73314357

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010707308.5A Active CN111930614B (en) 2020-07-20 2020-07-20 Automatic testing method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN111930614B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064830A (en) * 2021-04-14 2021-07-02 北京读我网络技术有限公司 Web page debugging method and device
CN113079070A (en) * 2021-06-07 2021-07-06 中国电子信息产业集团有限公司第六研究所 Method and device for monitoring response performance of domain name system
CN114191822A (en) * 2021-11-19 2022-03-18 腾讯科技(深圳)有限公司 Test method, test device, computer equipment, storage medium and product
CN114205274A (en) * 2021-11-02 2022-03-18 北京百度网讯科技有限公司 Network equipment testing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100088740A1 (en) * 2008-10-08 2010-04-08 Bookette Software Company Methods for performing secure on-line testing without pre-installation of a secure browser
CN108075930A (en) * 2018-01-05 2018-05-25 杭州云备姆科技有限公司 A kind of disaster tolerant backup system based on distributed structure/architecture
CN108243021A (en) * 2016-12-23 2018-07-03 国网重庆市电力公司綦南供电分公司 A kind of disaster tolerance emergency set and system
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN109189684A (en) * 2018-08-28 2019-01-11 四川长虹电器股份有限公司 Automatic interface testing method based on Python

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100088740A1 (en) * 2008-10-08 2010-04-08 Bookette Software Company Methods for performing secure on-line testing without pre-installation of a secure browser
CN108243021A (en) * 2016-12-23 2018-07-03 国网重庆市电力公司綦南供电分公司 A kind of disaster tolerance emergency set and system
CN108075930A (en) * 2018-01-05 2018-05-25 杭州云备姆科技有限公司 A kind of disaster tolerant backup system based on distributed structure/architecture
CN108268375A (en) * 2018-01-12 2018-07-10 深圳壹账通智能科技有限公司 Applied program testing method, device, computer equipment and storage medium
CN109189684A (en) * 2018-08-28 2019-01-11 四川长虹电器股份有限公司 Automatic interface testing method based on Python

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113064830A (en) * 2021-04-14 2021-07-02 北京读我网络技术有限公司 Web page debugging method and device
CN113079070A (en) * 2021-06-07 2021-07-06 中国电子信息产业集团有限公司第六研究所 Method and device for monitoring response performance of domain name system
CN113079070B (en) * 2021-06-07 2021-08-27 中国电子信息产业集团有限公司第六研究所 Method and device for monitoring response performance of domain name system
CN114205274A (en) * 2021-11-02 2022-03-18 北京百度网讯科技有限公司 Network equipment testing method and device
CN114205274B (en) * 2021-11-02 2024-06-11 北京百度网讯科技有限公司 Network equipment testing method and device
CN114191822A (en) * 2021-11-19 2022-03-18 腾讯科技(深圳)有限公司 Test method, test device, computer equipment, storage medium and product
CN114191822B (en) * 2021-11-19 2023-07-25 腾讯科技(深圳)有限公司 Test method, test device, computer equipment, storage medium and product

Also Published As

Publication number Publication date
CN111930614B (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN111930614B (en) Automatic testing method, device, equipment and medium
CN108874268B (en) User behavior data acquisition method and device
CN113065843B (en) Model processing method and device, electronic equipment and storage medium
CN104035869A (en) Application evaluation method, terminal, and server
CN106844204A (en) A kind of utilization mobile terminal generates the method and system of defect report
CN110363427A (en) Model quality evaluation method and apparatus
CN111352836A (en) Pressure testing method and related device
CN110515855B (en) Simulation control method, server and system for application program
CN107368407B (en) Information processing method and device
CN111813685A (en) Automatic testing method and device
CN112241625A (en) Method and system for automatically generating contract document based on java language
CN113010411B (en) Method and system for returning data based on mock service and simulation test method
CN110442806B (en) Method and apparatus for recognizing image
CN114546814A (en) Recording playback method, recording playback device and storage medium
CN111176624B (en) Method and device for generating stream type calculation index
CN113485902B (en) Method, device, equipment and computer readable medium for testing service platform
CN112882937A (en) Test case processing method and device, computer equipment and storage medium
CN112114833A (en) Device and method for determining middleware installation and deployment
CN112445697A (en) Method and apparatus for testing applications
CN112446192A (en) Method, device, electronic equipment and medium for generating text labeling model
CN111178014A (en) Method and device for processing business process
CN112988560A (en) Method and device for testing system robustness
CN112817839B (en) Artificial intelligence engine testing method, platform, terminal, computing device and storage medium
CN113742553B (en) Data processing method and device
CN115098351A (en) Service scene-based point burying method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant