CN110968517A - Automatic test method, device, platform and computer readable storage medium - Google Patents
Automatic test method, device, platform and computer readable storage medium Download PDFInfo
- Publication number
- CN110968517A CN110968517A CN201911230092.1A CN201911230092A CN110968517A CN 110968517 A CN110968517 A CN 110968517A CN 201911230092 A CN201911230092 A CN 201911230092A CN 110968517 A CN110968517 A CN 110968517A
- Authority
- CN
- China
- Prior art keywords
- target variable
- output result
- value
- target
- actual output
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3688—Test management for test execution, e.g. scheduling of test suites
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 embodiment of the invention provides an automatic testing method, an automatic testing device, an automatic testing platform and a computer readable storage medium, and relates to the field of software automatic testing. The method and the device set the first target variable as a preset first target value to trigger a click event of a button associated with the first target variable in the display equipment, determine a first theoretical output result according to the click event and the first target variable, read a value of a port corresponding to the first target variable in the simulation system as a first actual output result, and finally generate a test result according to the first theoretical output result and the first actual output result. Because the clicking event is triggered by changing the first target variable, the user does not need to click the display equipment in the test process; meanwhile, the value of the port corresponding to the first target variable can be automatically read to serve as a first actual output result, a test result is generated, a user does not need to read a display result by himself, and real automatic testing is achieved.
Description
Technical Field
The invention relates to the field of software automation test, in particular to an automatic test method, an automatic test device, an automatic test platform and a computer readable storage medium.
Background
Along with the continuous expansion of the computer software scale, QT application programs are increasing. To ensure the reliability of the software, manual or automated testing is typically performed for the QT application. Because manual testing needs to occupy a large amount of time and energy of testing personnel, repeated and tedious testing work is carried out, and the problems of low testing efficiency, error testing, missing testing and the like exist. Therefore, more and more QT application programs are tested quickly and comprehensively by means of an automatic testing technology, so that the software quality is improved, the software release period is shortened, and testers can get rid of tedious repeated testing work.
At present, the widely adopted automatic test method is mainly based on the recording playback technology of the QT event, generally needs to intercept the QT event of the whole test process, generate a script, and then play back the QT event in an automatic test mode, but the mode is more complex and increases the complexity of coding; meanwhile, the method still requires the user to perform operations such as 'clicking' on a screen and the like, and cannot achieve true automation.
Disclosure of Invention
In view of the above, the present invention provides an automatic testing method, apparatus, platform and computer readable storage medium to solve the above problems.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment provides an automatic test method applied to an automatic test platform, where the automatic test platform is in communication connection with a simulation system and a display device, and the simulation system and the display device are both electrically connected to a controller, and the method includes:
setting a first target variable as a preset first target value so as to trigger a click event of a button associated with the first target variable in the display equipment;
determining a first theoretical output result according to the click event and the first target variable;
reading a value of a port corresponding to the first target variable in the simulation system as a first actual output result, wherein the first actual output result is a voltage parameter output by the controller through the port in response to the click event;
and generating a test result according to the first theoretical output result and the first actual output result.
In an alternative embodiment, the method further comprises:
setting a second target variable to a preset second target value to enable the simulation system to simulate and generate an input signal transmitted to the controller based on the second target value;
reading a preset value of a third target variable as a second actual output result displayed by the display device, wherein the third target variable is associated with the second target variable, and the second actual output result is an analysis result obtained by analyzing the input signal by the controller;
determining a second theoretical output value based on the corresponding relation between the second target variable and the third target variable and the second target value;
and generating a test result according to a second theoretical output result and the second actual output result.
In an alternative embodiment, the step of reading the value of the preset third target variable as the second actual output result displayed by the display device comprises:
and after the preset time, reading the value of a preset third target variable as a second actual output result displayed by the display device.
In an alternative embodiment, the step of reading the value of the preset third target variable after the preset time as the second actual output result displayed by the display device comprises:
after a preset time, judging whether the second target variable is equal to the second target value;
and if the second target variable is equal to the second target value, reading a preset value of a third target variable to be used as a second actual output result displayed by the display equipment.
In an alternative embodiment, the method further comprises:
scanning internal variables of a QT application on the display device when the QT application is detected to be started;
and generating a list file which can be identified by the automatic test platform based on the internal variable.
In a second aspect, an embodiment provides an automatic testing apparatus applied to an automatic testing platform, where the automatic testing platform is in communication connection with a simulation system and a display device, and the simulation system and the display device are both electrically connected to a controller, and the apparatus includes:
the theoretical result generation module is used for determining a first theoretical output result according to the click event and the first target variable;
a reading module, configured to read a value of a port in the simulation system corresponding to the first target variable as a first actual output result, where the first actual output result is a voltage parameter output by the controller through the port in response to the click event;
and the result generating module is used for generating a test result according to the first theoretical output result and the first actual output result.
In an alternative embodiment, the apparatus further comprises:
the variable setting module is further used for setting a second target variable to a preset second target value so that the simulation system generates an input signal transmitted to the controller based on the second target value in a simulation mode;
the reading module is further configured to read a value of a preset third target variable as a second actual output result displayed by the display device, where the preset third target variable is associated with the second target variable, and the second actual output result is an analysis result obtained by analyzing the input signal by the controller;
the theoretical result generation module is further used for determining a second theoretical output value based on the corresponding relation between the second target variable and the third target variable and the second target value;
the result generating module is further used for generating a test result according to a second theoretical output result and the second actual output result.
In an alternative embodiment, the apparatus further comprises:
a scanning module for scanning internal variables of a QT application on the display device when it is detected that the QT application is started;
and the list file generation module is used for generating a list file which can be identified by the automatic test platform based on the internal variables.
In a third aspect, an embodiment provides an automatic test platform, including a processor and a memory, where the memory stores machine executable instructions capable of being executed by the processor, and the processor can execute the machine executable instructions to implement the automatic test method described in any one of the foregoing embodiments.
In a fourth aspect, embodiments provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements an automatic testing method according to any of the preceding embodiments.
According to the automatic test method, the automatic test device, the automatic test platform and the computer readable storage medium, the first target variable is set to be the preset first target value, so that a click event of a button related to the first target variable in the display equipment is triggered, then a first theoretical output result is determined according to the click event and the first target variable, a value of a port corresponding to the first target variable in the simulation system is read to serve as a first actual output result, and finally a test result is generated according to the first theoretical output result and the first actual output result. Because the clicking event is triggered by changing the first target variable, the user does not need to click the display equipment in the test process; meanwhile, the value of the port corresponding to the first target variable can be automatically read to serve as a first actual output result, a test result is generated, a user does not need to read a display result by himself, and real automatic testing is achieved.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a block diagram of an automatic test system according to the present invention.
Fig. 2 is a block diagram of an automatic test platform according to the present invention.
FIG. 3 is a flow chart of an automatic testing method provided by the present invention.
Fig. 4 is another flowchart of the automatic testing method provided by the present invention.
FIG. 5 is a further flow chart of the automated testing method provided by the present invention.
Fig. 6 is a functional block diagram of an automatic test apparatus according to an embodiment of the present invention.
Icon: 100-automatic test system; 110-automatic test platform; 112-a memory; 114-a processor; 116-a communication module; 120-a simulation system; 130-a controller; 140-a display device; 200-automatic test equipment; 210-variable setting module; 220-theoretical result generation module; 230-a reading module; 240-result generation module; 250-a judgment module; 260-a scanning module; 270-list file generation module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The invention provides an automatic test system 100 for automatically testing a QT application. Referring to fig. 1, a block diagram of an automatic test system 100 according to the present invention is shown. The automatic test system 100 includes an automatic test platform 110, a simulation system 120, a display device 140, and a controller 130. The automatic test platform 110 is in communication connection with both the simulation system 120 and the display device 140, and both the simulation system 120 and the display device 140 are electrically connected with the controller 130.
The display device 140 is used to display a graphical user interface of the QT application, such as a graphical user interface that may include a plurality of parameter names and their corresponding values, etc., so as to interact with a user.
The controller 130 is configured to run the QT application, and transmit the running result thereof to the display device 140 to be displayed by the display device 140.
In addition, the simulation system 120 is also used to output voltage parameters of the ports included by the controller 130.
The automated test platform 110 may set the input and output of test scripts to implement automated script writing and execution. For example, the automated test platform 110 may set test data and transmit the test data to the simulation system 120, thereby causing the simulation system 120 to simulate the input signal based on the test data.
Meanwhile, the automatic test platform 110 may also directly read or write various program variables of the controller 130 and the display device 140 in the operation process through the MODBUS communication protocol, so as to simulate various test scenarios.
Referring to fig. 2, a block diagram of the automatic test platform 110 is shown. The automated test platform 110 includes a memory 112, a processor 114, and a communication module 116. The memory 112, processor 114 and communication module 116 are electrically connected to each other directly or indirectly to enable data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
The memory 112 is used for storing programs or data. The Memory 112 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an erasable Read-Only Memory (EPROM), an electrically erasable Read-Only Memory (EEPROM), and the like.
The processor 114 is used to read/write data or programs stored in the memory 112 and perform corresponding functions.
The communication module 116 is used for establishing a communication connection between the automatic test platform 110 and other communication terminals through the network, and for transceiving data through the network.
It should be understood that the configuration shown in fig. 2 is merely a schematic diagram of the automated test platform 110, and that the automated test platform 110 may include more or fewer components than those shown in fig. 2, or have a different configuration than that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
First embodiment
The present invention provides an automatic testing method, which is applied to the automatic testing platform 110 in fig. 1. Please refer to fig. 3, which is a flowchart illustrating an automatic testing method according to the present invention. The automatic test method comprises the following steps:
s301, setting the first target variable as a preset first target value to trigger a click event of a button associated with the first target variable in the display device 140.
For example, if the user needs to test the switch function in the QT application. In the prior art, the display device 140 may directly click a power-on button or a power-off button, and determine whether the switch functions normally according to the response of the device.
In the present application, however, the power-on button may be associated with the first target variable. It should be noted that associating the power-on button with the first target variable may mean that the value of the first target variable determines whether the power-on button is in a pressed state or in an un-pressed state.
For example, a first target variable is defined as 0, indicating that the power-on button is not pressed; when the first target variable is 1, the starting button is pressed; therefore, as long as the preset first target value is set to 1, the operation of clicking the power-on button can be triggered when the first target variable is set to 1.
It can be understood that the method of changing the first target variable triggers the click event, and the user does not need to click the display device 140 during the test process, so that the test process is more automated.
S302, determining a first theoretical output result according to the click event and the first target variable.
Typically, when the controller 130 detects a certain click operation, the voltage parameter of its corresponding port is changed. Therefore, the first theoretical output result is the voltage parameter of the port on the controller 130 corresponding to the click event when the controller 130 detects the click event and the controller 130 works normally.
S303, reading a value of a port corresponding to the first target variable in the simulation system 120 as a first actual output result.
The first actual output result is a voltage parameter outputted by the controller 130 through the port in response to the click event. The voltage parameter may be, but is not limited to, a voltage value, a level value, and the like. That is, the controller 130 changes a voltage parameter of a certain port of the controller 130 in response to the click event, and then transmits the voltage parameter to a port of the simulation system 120 corresponding to the first target variable, and the voltage parameter is automatically read by the automatic test platform 110.
The port corresponding to the first target variable actually means that the voltage value of the port is associated with the click operation. That is, the occurrence of the clicking operation may directly cause a change in the value of the port corresponding to the first target variable in the simulation system 120.
S304, generating a test result according to the first theoretical output result and the first actual output result.
Specifically, if the error between the first theoretical output result and the first actual output result is within a preset range, determining that the test result is abnormal; otherwise, determining that the test result is abnormal.
For example, if the click event is an event of "increasing speed" click, the error between the first theoretical output result and the first actual output result is within a preset range, and it is determined that the test result is abnormal; otherwise, determining that the test result is abnormal.
It is understood that steps S301 to S304 are all test procedures simulating the user controlling the display device 140 to perform corresponding operations on the controller 130. The automatic test method provided by the present application further includes a process of testing whether the display device 140 can normally display the operating parameters of the controller 130. Please refer to fig. 4, which is another flowchart of the automatic testing method according to the present invention. The automatic test method further comprises the following steps:
s305, the second target variable is set to a preset second target value, so that the simulation system 120 generates the input signal transmitted to the controller 130 based on the second target value.
It should be noted that the second target variable can be used as an operating parameter of the simulation system 120. For example, the second target variable may be a resistance value of each channel, a level value of each channel, or the like. In addition, different second target variables may simulate different models of excavators under different operating conditions. Therefore, the test environment can be changed directly by modifying the value of the second target variable, and the method is convenient and simple.
And S306, after the preset time, judging whether the second target variable is equal to the second target value.
That is, after waiting for the preset time, it is determined whether the second target variable is equal to the second target value, so as to determine whether the setting is successful, and avoid obtaining an abnormal test result under the condition that the second target variable is not successfully set as the second target value.
S307, if the second target variable is equal to the second target value, reading a value of a preset third target variable as a second actual output result displayed by the display device 140.
The third target variable is associated with the second target variable, and the output result is an analysis result obtained by analyzing the input signal by the controller 130.
That is, after confirming that the second target variable setting is successful, the value of the preset third target variable is read as the second actual output result displayed by the display device 140. The association between the third target variable and the second target variable may mean that the second target variable and the third target variable have a corresponding relationship, so that the third target variable may change along with the change of the second target variable.
For example, the second target variable may be the resistance value of the passage 6, and the resistance value of the passage 6 may cause the fuel level to change, so that the third target variable is the fuel level.
And S308, determining a second theoretical output value based on the corresponding relation between the second target variable and the third target variable and the second target value.
It will be understood that the second theoretical output value is the value of the third target variable in the case where the second target variable is the second target value. For example, if the second target variable is the voltage value of the voltage channel 1 of the simulation system 120, the third target variable is the pump pressure value, and the second target value is set to 1V, the pump pressure value at this time is the second theoretical output value.
It should be noted that the corresponding relationship is preset, and for example, the corresponding relationship may be converted by a preset formula, or may also be corresponded by a pre-established table entry.
And S309, generating a test result according to the second theoretical output result and the second actual output result.
Similarly, if the error between the second theoretical output result and the second actual output result is within the preset range, determining that the test result is abnormal; otherwise, determining that the test result is abnormal.
For example, the automated inspection platform may execute the following script to implement the automated test, which corresponds to S305-S309.
#CFGFILE List[0]
#R_Out(6,40)
#DELAY 3
#CheckValue(R_State.6==40)
#WAIT 10 N5DispI1.INT3(var==78)
Wherein, # R _ Out (6,40) is to set the resistance value of the channel 6 to 40, and the resistance value of the channel 6 is to be the second target variable, and the second target value is to be 40; CheckValue (R _ state.6 ═ 40) is used to check whether the resistance value of the channel 6 is 40; the WAIT 10 n5dispi1.int3(var ═ 78) is used for reading a parameter of a variable, i.e., n5dispi1.int3, and the oil level of the characteristic fuel is 78, i.e., n5dispi1.int3 is a third target variable, and 78 is a second actual output result.
In an alternative embodiment, in order to facilitate the tester to determine the parameter types included in the QT test program in advance, referring to fig. 5, the automatic test method provided by the present invention may further include:
s310, when the QT application on the display device 140 is detected to be started, internal variables of the QT application are scanned.
It should be noted that the internal variable is a variable parameter during the execution of the QT application.
S311, a list file recognizable by the automatic test platform 110 is generated based on the internal variables.
Wherein the list file contains the number of internal variables, index, data type, and data length. By obtaining the list file, the tester can send data to the display device 140 according to the MODBUS protocol in a fixed format when debugging the application program. The display device 140 receives the data, parses it, and then modifies the value of the corresponding variable, thereby triggering the implementation of the corresponding business logic and functions.
Second embodiment
In order to execute the corresponding steps in the above embodiments and various possible manners, an implementation manner of the automatic test apparatus 200 is given below, and optionally, the automatic test apparatus 200 may adopt the device structure of the automatic test apparatus 200 shown in fig. 6. Further, referring to fig. 6, fig. 6 is a functional block diagram of an automatic test apparatus 200 according to an embodiment of the present invention. It should be noted that the basic principle and the generated technical effect of the automatic testing apparatus 200 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and corresponding contents in the above embodiments may be referred to. The automatic test apparatus 200 includes: a variable setting module 210, a theoretical result generating module 220, a reading module 230, a result generating module 240, a judging module 250, a scanning module 260, and a list file generating module 270.
The variable setting module 210 is configured to set the first target variable to a preset first target value, so as to trigger a click event of a button associated with the first target variable in the display device 140.
It is to be appreciated that in an alternative embodiment, the variable setting module 210 may be configured to perform S301.
The theoretical result generating module 220 is configured to determine a first theoretical output result according to the click event and the first target variable.
It is to be appreciated that in an alternative embodiment, the theoretical result generation module 220 may be configured to perform S302.
The reading module 230 is configured to read a value of a port corresponding to the first target variable in the simulation system 120 as the first actual output result.
It is understood that in an alternative embodiment, the reading module 230 may be configured to perform S303.
The result generating module 240 is configured to generate a test result according to the first theoretical output result and the first actual output result.
It is understood that in an alternative embodiment, the result generation module 240 may be configured to perform S304.
The variable setting module 210 is configured to set the second target variable to a preset second target value, so that the simulation system 120 generates the input signal to the controller 130 based on the second target value simulation.
It is to be appreciated that in an alternative embodiment, the variable setting module 210 can be configured to perform S305.
The determining module 250 is configured to determine whether the second target variable is equal to the second target value after a preset time.
It is to be appreciated that in an alternative embodiment, the determining module 250 may be configured to perform S306.
The reading module 230 is configured to read a preset value of a third target variable as a second actual output result displayed by the display device 140 if the second target variable is equal to the second target value, where the third target variable is associated with the second target variable, and the output result is an analysis result obtained by analyzing the input signal by the controller 130.
It is understood that in an alternative embodiment, the reading module 230 may be configured to execute S307.
The theoretical result generating module 220 is further configured to determine a second theoretical output value based on the correspondence between the second target variable and the third target variable and the second target value.
It is to be appreciated that in an alternative embodiment, the theoretical result generation module 220 may be configured to perform S308.
The result generating module 240 is configured to generate a test result according to the second theoretical output result and the second actual output result.
It is understood that in an alternative embodiment, the result generation module 240 may be configured to execute S309.
The scanning module 260 is used to scan internal variables of the QT application when it is detected that the QT application on the display device 140 is launched.
It is to be appreciated that in an alternative embodiment, the scanning module 260 can be configured to perform S310.
The list file generation module 270 is configured to generate a list file that the automated test platform 110 can recognize based on the internal variables.
It is appreciated that in an alternative embodiment, the list file generation module 270 may be configured to execute S311.
Alternatively, the modules may be stored in the memory 112 shown in fig. 2 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the automatic test platform 110, and may be executed by the processor 114 in fig. 2. Meanwhile, data, codes of programs, and the like required to execute the above modules may be stored in the memory 112.
In summary, according to the automatic testing method, the automatic testing device, the automatic testing platform, and the computer-readable storage medium provided in the embodiments of the present invention, the first target variable is set as the preset first target value, so as to trigger the click event of the button associated with the first target variable in the display device, then determine the first theoretical output result according to the click event and the first target variable, read the value of the port corresponding to the first target variable in the simulation system as the first actual output result, and finally generate the testing result according to the first theoretical output result and the first actual output result. Because the clicking event is triggered by changing the first target variable, the user does not need to click the display equipment in the test process; meanwhile, the value of the port corresponding to the first target variable can be automatically read to serve as a first actual output result, a test result is generated, a user does not need to read a display result by himself, and real automatic testing is achieved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in the embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (10)
1. An automatic test method is applied to an automatic test platform, the automatic test platform is in communication connection with a simulation system and a display device, the simulation system and the display device are electrically connected with a controller, and the method comprises the following steps:
setting a first target variable as a preset first target value so as to trigger a click event of a button associated with the first target variable in the display equipment; determining a first theoretical output result according to the click event and the first target variable;
reading a value of a port corresponding to the first target variable in the simulation system as a first actual output result, wherein the first actual output result is a voltage parameter output by the controller through the port in response to the click event;
and generating a test result according to the first theoretical output result and the first actual output result.
2. The automated testing method of claim 1, further comprising:
setting a second target variable to a preset second target value to enable the simulation system to simulate and generate an input signal transmitted to the controller based on the second target value;
reading a preset value of a third target variable as a second actual output result displayed by the display device, wherein the third target variable is associated with the second target variable, and the second actual output result is an analysis result obtained by analyzing the input signal by the controller;
determining a second theoretical output value based on the corresponding relation between the second target variable and the third target variable and the second target value;
and generating a test result according to a second theoretical output result and the second actual output result.
3. The automatic test method according to claim 2, wherein the step of reading the value of the preset third target variable as the second actual output result displayed by the display device comprises:
and after the preset time, reading the value of a preset third target variable as a second actual output result displayed by the display device.
4. The automatic test method according to claim 3, wherein the step of reading the value of the preset third target variable after the preset time as the second actual output result displayed by the display device comprises:
after a preset time, judging whether the second target variable is equal to the second target value;
and if the second target variable is equal to the second target value, reading a preset value of a third target variable to be used as a second actual output result displayed by the display equipment.
5. The automated testing method of any of claims 1-4, wherein the method further comprises:
scanning internal variables of a QT application on the display device when the QT application is detected to be started;
and generating a list file which can be identified by the automatic test platform based on the internal variable.
6. The utility model provides an automatic testing arrangement which characterized in that is applied to automatic test platform, automatic test platform and analog system and display device are all communication connection, analog system reaches display device all is connected with the controller electricity, the device includes:
the variable setting module is used for setting a first target variable to a preset first target value so as to trigger a click event of a button related to the first target variable in the display equipment;
the theoretical result generation module is used for determining a first theoretical output result according to the click event and the first target variable;
a reading module, configured to read a value of a port in the simulation system corresponding to the first target variable as a first actual output result, where the first actual output result is a voltage parameter output by the controller through the port in response to the click event;
and the result generating module is used for generating a test result according to the first theoretical output result and the first actual output result.
7. The automatic test device of claim 6, further comprising:
the variable setting module is further used for setting a second target variable to a preset second target value so that the simulation system generates an input signal transmitted to the controller based on the second target value in a simulation mode;
the reading module is further configured to read a value of a preset third target variable as a second actual output result displayed by the display device, where the preset third target variable is associated with the second target variable, and the second actual output result is an analysis result obtained by analyzing the input signal by the controller;
the theoretical result generation module is further used for determining a second theoretical output value based on the corresponding relation between the second target variable and the third target variable and the second target value;
the result generating module is further used for generating a test result according to a second theoretical output result and the second actual output result.
8. The automatic test device of claim 7, further comprising:
a scanning module for scanning internal variables of a QT application on the display device when it is detected that the QT application is started;
and the list file generation module is used for generating a list file which can be identified by the automatic test platform based on the internal variables.
9. An automated test platform comprising a processor and a memory, the memory storing machine executable instructions executable by the processor to perform the automated test method of any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the automatic test method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911230092.1A CN110968517B (en) | 2019-12-04 | 2019-12-04 | Automatic test method, apparatus, platform and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911230092.1A CN110968517B (en) | 2019-12-04 | 2019-12-04 | Automatic test method, apparatus, platform and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110968517A true CN110968517A (en) | 2020-04-07 |
CN110968517B CN110968517B (en) | 2023-05-12 |
Family
ID=70033202
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911230092.1A Active CN110968517B (en) | 2019-12-04 | 2019-12-04 | Automatic test method, apparatus, platform and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110968517B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694758A (en) * | 2020-08-04 | 2020-09-22 | 西安闻泰电子科技有限公司 | Test code automatic generation method and device, computer equipment and storage medium |
CN112835758A (en) * | 2021-03-22 | 2021-05-25 | 四川酷比通信设备有限公司 | Method for self-starting and automatically running test software and terminal equipment |
CN117784678A (en) * | 2023-12-22 | 2024-03-29 | 上海剑桥科技股份有限公司 | Control method, equipment and computer readable medium of anti-interference detector |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130311827A1 (en) * | 2012-05-16 | 2013-11-21 | International Business Machines Corporation | METHOD and APPARATUS for automatic testing of automation software |
CN107133253A (en) * | 2015-12-31 | 2017-09-05 | 达索系统公司 | Recommendation based on forecast model |
CN107391379A (en) * | 2017-07-28 | 2017-11-24 | 武汉斗鱼网络科技有限公司 | Interface automatic test approach and device |
CN110471834A (en) * | 2019-06-28 | 2019-11-19 | 平安银行股份有限公司 | Credit card analog detection method and relevant device under more transaction channels |
-
2019
- 2019-12-04 CN CN201911230092.1A patent/CN110968517B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130311827A1 (en) * | 2012-05-16 | 2013-11-21 | International Business Machines Corporation | METHOD and APPARATUS for automatic testing of automation software |
CN107133253A (en) * | 2015-12-31 | 2017-09-05 | 达索系统公司 | Recommendation based on forecast model |
CN107391379A (en) * | 2017-07-28 | 2017-11-24 | 武汉斗鱼网络科技有限公司 | Interface automatic test approach and device |
CN110471834A (en) * | 2019-06-28 | 2019-11-19 | 平安银行股份有限公司 | Credit card analog detection method and relevant device under more transaction channels |
Non-Patent Citations (1)
Title |
---|
胡再超;姚亮;张尧;: "智能继电保护装置的自动测试方法" * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111694758A (en) * | 2020-08-04 | 2020-09-22 | 西安闻泰电子科技有限公司 | Test code automatic generation method and device, computer equipment and storage medium |
CN111694758B (en) * | 2020-08-04 | 2024-01-16 | 西安闻泰电子科技有限公司 | Test code automatic generation method, device, computer equipment and storage medium |
CN112835758A (en) * | 2021-03-22 | 2021-05-25 | 四川酷比通信设备有限公司 | Method for self-starting and automatically running test software and terminal equipment |
CN117784678A (en) * | 2023-12-22 | 2024-03-29 | 上海剑桥科技股份有限公司 | Control method, equipment and computer readable medium of anti-interference detector |
CN117784678B (en) * | 2023-12-22 | 2024-08-02 | 上海剑桥科技股份有限公司 | Control method, equipment and product of anti-interference detector |
Also Published As
Publication number | Publication date |
---|---|
CN110968517B (en) | 2023-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105866575B (en) | Vehicle-mounted display comprehensive testing device and testing method | |
CN112817872B (en) | Development test system and method | |
CN110968517B (en) | Automatic test method, apparatus, platform and computer readable storage medium | |
KR100985749B1 (en) | Automatic-testing system and method for embedded system software and test scenario composing method | |
CN109522181B (en) | Performance test method, device and equipment of distributed storage system | |
CN107102949B (en) | Application program offline testing method and tool | |
CN109543417B (en) | Vulnerability mining method and device based on Qemu platform | |
CN108628734B (en) | Functional program debugging method and terminal | |
CN111522725A (en) | SSD performance automatic evaluation method, device, equipment and medium | |
CN113094251B (en) | Method and device for testing embedded system, computer equipment and storage medium | |
CN112543478B (en) | WiFi module automatic test method and device, computer equipment and storage medium | |
CN114281624A (en) | Method, system, device and equipment for testing I2C signal integrity | |
CN114141302A (en) | Test method of solid state disk and electronic equipment | |
CN115733741B (en) | Abnormal scene test method and device for system to be tested | |
CN111475358A (en) | Automatic testing method and device for controller interface | |
CN113742151B (en) | Multi-version CDM tool automatic test method, device and computer equipment | |
CN108965053A (en) | Upper computer software method for testing pressure, apparatus and system | |
CN113590498A (en) | Method and system for testing application starting time of desktop operating system | |
KR100992622B1 (en) | Method and system for performing automatic test in embedded platform | |
RU2817186C1 (en) | System for confirming tests and testing embedded software of electronic devices | |
CN111858194A (en) | Method and device for generating and processing robot error, robot and background server | |
CN116610557B (en) | Action binding information debugging method and device, storage medium and electronic equipment | |
CN116185879B (en) | Python-based intelligent cabin instrument automatic test method and system | |
CN118093381B (en) | Software testing method and system based on artificial intelligence | |
CN112748300B (en) | Test method, test device and test system of microwave equipment |
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 |