CN116955207A - Automatic test method, system and medium for identifying software and hardware completed by test case - Google Patents
Automatic test method, system and medium for identifying software and hardware completed by test case Download PDFInfo
- Publication number
- CN116955207A CN116955207A CN202311196160.3A CN202311196160A CN116955207A CN 116955207 A CN116955207 A CN 116955207A CN 202311196160 A CN202311196160 A CN 202311196160A CN 116955207 A CN116955207 A CN 116955207A
- Authority
- CN
- China
- Prior art keywords
- test
- command
- hardware
- case
- template
- 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.)
- Pending
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 165
- 238000010998 test method Methods 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 claims abstract description 35
- 238000012544 monitoring process Methods 0.000 claims abstract description 17
- 238000004088 simulation Methods 0.000 claims abstract description 7
- 230000009471 action Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 15
- 238000004590 computer program Methods 0.000 claims description 3
- 238000003825 pressing Methods 0.000 claims description 3
- 238000012423 maintenance Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000012812 general test Methods 0.000 description 2
- 238000002360 preparation method Methods 0.000 description 2
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000013100 final test Methods 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
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/3684—Test management for test design, e.g. generating new test cases
-
- 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 application provides an automatic test method, a system and a medium for identifying software and hardware of a test case, wherein the method comprises the following steps: selecting a test script to be tested, and starting an automatic test; and converting the test script into a test command, judging whether the test command is aimed at UI simulation or hardware control, performing corresponding test operation according to the type of the test command, and integrating and outputting a test related result by combining a device monitoring result. The application can solve the problem that the existing test mode can not cover the related function test of the physical key and the touch screen, realize the whole closed loop test flow, automatically collect the test information and improve the test efficiency.
Description
Technical Field
The application relates to the field of testing, in particular to an automatic testing method, system and medium for identifying software and hardware completed by test cases.
Background
In the traditional system automation test, the test case cannot be identified usually before the automation test, and the automation test needs to write codes for the second time on the basis of the test case; the maintenance can be performed only by a code foundation, so that the range of maintenance personnel is limited; the related function test of physical keys and touch screens cannot be covered, and a perfect closed loop cannot be realized.
In the prior art, maintenance test codes are required to be written manually, and test cases cannot be reused; only partial test can be carried out on the operating system through software simulation (mechanical control), and the partial software test or the partial mechanical test can not completely cover the whole system function during the test; the test is unreal and incomplete, and the test omission which cannot be solved exists; the test results need manual maintenance and cannot be separated from manual participation.
Disclosure of Invention
The application provides an automatic test method, system and medium for identifying software and hardware of a test case, which can identify a general test case without secondary code development, reduce development and maintenance cost to a certain extent and improve test efficiency.
The first aspect of the application discloses an automatic test method for identifying software and hardware completed by a test case, which comprises the following steps:
s1, selecting a test script to be tested, starting automatic test, and simultaneously automatically starting an equipment monitoring module to record the information of the memory, CPU, IO, temperature and electric quantity of the equipment in the test process;
s2, converting the test script in the step S1 into a test command according to the use case template by the use case analysis module, and sequentially executing corresponding test cases;
s3, judging whether an unexecuted test command exists, and if so, judging whether the test command generated in the step S2 is for UI simulation or hardware control: if the UI simulation test command is, entering step S4; if the hardware control test command is, entering step S6; if no unexecuted test command exists, exiting;
s4, decomposing the test command in the step S3 to obtain the test command including the action, the position, the time and the content of the operation step;
s5, performing clicking, double clicking, sliding, inputting and zooming operations on the tested equipment according to the different actions and the position information of the operation step obtained in the step S4, and recording corresponding test results; returning to the step S3;
s6, converting the test command into a command which can be identified by the mechanical arm according to the test command;
and S7, the mechanical arm performs actions of key pressing and screen control on the tested equipment according to the command transmitted in the step S6, records the test result and the process, and returns to the step S3.
According to the method of the first aspect of the present application, before executing the step S1, the method further includes: and building a test environment, wherein the test environment comprises a mechanical arm, tested equipment and a command analysis module, and the test topology is accessed through WIFI.
According to the method of the first aspect of the present application, the step S2 specifically includes: setting a case template, and converting the test case into a test command; the case template is written by adopting a unified rule template, the template content comprises actions, positions, time and content, the command analysis module analyzes the test case through rule matching, the case which does not accord with the rule template is retrieved from an analysis library, and when the retrieval return result comprises the content of the template which accords with the standard, the analysis result is recorded; otherwise, when the search return result does not contain the content meeting the standard template, the use case is skipped.
According to the method of the first aspect of the present application, the step S5 further includes: and carrying out clicking, double clicking, sliding, inputting and zooming operations on the tested equipment through the serial port according to different actions and position information, and judging whether the test command is successful or not according to the serial port return value.
According to the method of the first aspect of the present application, the step S6 specifically includes: the test command is sent to a command receiving module connected with the mechanical arm through a wireless module; the command receiving module is used for judging whether the received command is compliant; the command combination rule initiates control to the mechanical arm; command disagreement is sent back to the retransmission message.
According to the method of the first aspect of the present application, the step S7 further includes: judging whether the test case is successfully executed according to the log and the operation record in the test process and the serial port information.
According to the method of the first aspect of the application, for the test cases in which the analysis fails, the test cases are submitted to the manual annotation platform for manual analysis, and the results are stored in the analysis library.
The method according to the first aspect of the present application, after the step S7, further includes: the equipment monitoring module outputs monitoring information, the monitoring information comprises collecting problems in the automatic test, summarizing test steps and system logs, automatically submitting the problems to a BUG platform, and combining the monitoring information and use case results to produce an overall test report.
The application discloses an automatic test system for identifying software and hardware of a test case, which comprises computer equipment, wherein the computer equipment is used for executing the steps of the automatic test method for identifying the software and the hardware of the test case.
The third aspect of the present application discloses a computer readable storage medium, on which a computer program is stored, so as to implement the method for automatically testing software and hardware by identifying test cases according to the first aspect.
In summary, the scheme provided by the application has the following technical effects: the application provides an automatic test method for completing software and hardware by self-identifying test cases, which can identify general test cases without secondary code development, and reduces development and maintenance cost in the test. Meanwhile, the UI test and the key test can be performed, the defects of the original test method are complemented by the method, and the whole test flow is closed. In addition, after the test is finished, the test information is automatically collected and submitted to the BUG, so that the timely check of the automatic test result is ensured. The test cases can be parsed into automation cases without additional code writing. And the whole testing process is perfected by combining software simulation and mechanical control, and the test is more comprehensive and accurate. And the whole test process is closed, so that the manual participation is greatly reduced.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a basic flow of an embodiment of the present application;
fig. 2 is a flowchart illustrating the implementation of the steps of the method according to the embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
As shown in FIG. 1, the application discloses a basic flow for completing the automatic test of software and hardware by identifying test cases, which comprises the following steps:
s1: setting test preparation;
the test preparation includes setting up a test environment, which may be a test environment of the prior art; in addition, a mechanical arm, tested equipment and a command analysis module are arranged, WIFI access test topology is started, and meanwhile performance of each component is guaranteed.
And checking a test script to be tested, starting automatic test, automatically starting an equipment monitoring module, and recording information such as the memory, CPU, IO, temperature, electric quantity and the like of equipment in the test process for subsequent test report analysis. The monitoring module is always in the monitoring process in the whole automatic testing process, records the related information, ensures the execution of the testing process, and plays a role in supervision.
S2: script analysis is carried out on the test cases;
referring to the specific implementation steps shown in fig. 2, the use case parsing module converts the test use case into a test command according to the use case template. The use cases are written by adopting a unified rule template. The template content comprises actions, positions, time and content, and the test cases are analyzed through rule matching; the use cases which do not accord with the rule templates are retrieved from the analysis library, and the retrieval returned result contains the content of the template which accords with the standard; if no result is detected, the use case is skipped.
And submitting the test cases with failed analysis to a manual labeling platform for manual analysis, and storing the results into an analysis library.
S3: based on the script analysis result obtained in the step S2, the tested equipment or the mechanical arm;
in the case execution process, whether the generated test command is aimed at UI simulation or hardware control is judged.
If the obtained script analysis result is UI simulation, the operation steps of decomposition are actions, positions, time and contents.
And (3) carrying out clicking, double clicking, sliding, inputting, zooming and other operations on the tested equipment through the serial port according to different actions and position information, inputting the obtained serial port information into the tested equipment, and judging whether the command is successful or not according to the serial port return value.
If the return value is N, continuing to judge the retry remaining times, and if the retry remaining times are greater than 0, subtracting one from the times, and retrying the failed action command. And when the residual number of retries is zero, the retries are abandoned, and the test conclusion is directly recorded.
If the control is judged to be related to hardware, the control is converted into a command which can be identified by the mechanical arm according to the command in the test script, and the command is sent to a command receiving module connected with the mechanical arm through a wireless module. The command receiving module is used for judging whether the received command is compliant or not, and the command compliant rule initiates control to the mechanical arm; the command disagrees with rules to return the retransmitted message to the sending module. And the mechanical arm performs the actions of key pressing and screen control on the tested equipment according to the incoming command. The results and the procedure were recorded.
And judging whether the use case is successfully executed according to the log and the operation record produced in the process and the serial port information after the use case is executed.
And after the execution of the current test case is finished, continuing to execute the subsequent test cases until all the test cases are finished.
S4: a test report is generated.
And summarizing and starting monitoring information produced by the monitoring module, collecting problems in the test, summarizing the test steps, a system log, and an automatically submitted BUG platform, and merging the monitoring information and the use case result to produce an overall test report.
And the problems occurring in the test platform are independently summarized, and the possible problems in the test platform are analyzed and repaired, so that the robustness of the platform is improved.
The embodiment of the application also provides an automatic test system for identifying the software and hardware of the test case, which comprises computer equipment, wherein the computer equipment is used for executing the steps of the automatic test method for identifying the software and hardware of the test case.
The embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program so as to realize the automatic test method for identifying the software and hardware of the test case completion in the first aspect.
In summary, the technical scheme provided by the application has the following technical effects: the application is mainly used for optimizing the process of converting the test case into the automatic case; the original software simulation scheme is improved, and the mechanical arm is added to operate hardware; meanwhile, the test result and the BUG submission are fully automated, the whole test process is perfected, and the final test result is more comprehensive and accurate.
Note that the technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be regarded as the scope of the description. The foregoing examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.
Claims (10)
1. An automatic test method for identifying software and hardware completed by a test case is characterized by comprising the following steps:
s1, selecting a test script to be tested, starting automatic test, and simultaneously automatically starting an equipment monitoring module to record the information of the memory, CPU, IO, temperature and electric quantity of the equipment in the test process;
s2, converting the test script in the step S1 into a test command according to the use case template by the use case analysis module, and sequentially executing corresponding test cases;
s3, judging whether an unexecuted test command exists, and if so, judging whether the test command generated in the step S2 is for UI simulation or hardware control: if the UI simulation test command is, entering step S4; if the hardware control test command is, entering step S6; if no unexecuted test command exists, exiting;
s4, decomposing the test command in the step S3 to obtain the test command including the action, the position, the time and the content of the operation step;
s5, performing clicking, double clicking, sliding, inputting and zooming operations on the tested equipment according to the different actions and the position information of the operation step obtained in the step S4, and recording corresponding test results; returning to the step S3;
s6, converting the test command into a command which can be identified by the mechanical arm according to the test command;
and S7, the mechanical arm performs actions of key pressing and screen control on the tested equipment according to the command transmitted in the step S6, records the test result and the process, and returns to the step S3.
2. The automated test method for identifying test case completion software and hardware according to claim 1, further comprising, before executing step S1: and building a test environment, wherein the test environment comprises a mechanical arm, tested equipment and a command analysis module, and the test topology is accessed through WIFI.
3. The method for automatically testing software and hardware for recognizing test cases according to claim 2, wherein the step S2 specifically includes: setting a case template, and converting the test case into a test command; the case template is written by adopting a unified rule template, the template content comprises actions, positions, time and content, the command analysis module analyzes the test case through rule matching, the case which does not accord with the rule template is retrieved from an analysis library, and when the retrieval return result comprises the content of the template which accords with the standard, the analysis result is recorded; otherwise, when the search return result does not contain the content meeting the standard template, the use case is skipped.
4. The method for automatically testing software and hardware for recognizing test cases according to claim 1, wherein the step S5 further comprises:
and carrying out clicking, double clicking, sliding, inputting and zooming operations on the tested equipment through the serial port according to different actions and position information, and judging whether the test command is successful or not according to the serial port return value.
5. The method for automatically testing software and hardware for recognizing test cases according to claim 1, wherein the step S6 specifically comprises: the test command is sent to a command receiving module connected with the mechanical arm through a wireless module; the command receiving module is used for judging whether the received command is compliant; the command combination rule initiates control to the mechanical arm; command disagreement is sent back to the retransmission message.
6. The method for automatically testing software and hardware for recognizing test cases according to claim 4, wherein the step S7 further comprises: judging whether the test case is successfully executed according to the log and the operation record in the test process and the serial port information.
7. The automated test method for recognizing test cases to complete software and hardware according to claim 3, wherein for test cases in which the parsing fails, the test cases are submitted to a manual annotation platform for manual parsing, and the result is stored in a parsing library.
8. The method for automatically testing software and hardware for recognizing test cases according to claim 1, wherein the step S7 further comprises: the equipment monitoring module outputs monitoring information, the monitoring information comprises collecting problems in the automatic test, summarizing test steps and system logs, automatically submitting the problems to a BUG platform, and combining the monitoring information and use case results to produce an overall test report.
9. An automatic test system for identifying software and hardware completed by test cases comprises computer equipment and is characterized in that: the computer device is used for executing the steps of the method for automatically testing software and hardware by identifying test cases according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized by: the computer readable storage medium stores a computer program for realizing the method for automatically testing software and hardware by identifying test cases according to any one of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311196160.3A CN116955207A (en) | 2023-09-18 | 2023-09-18 | Automatic test method, system and medium for identifying software and hardware completed by test case |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311196160.3A CN116955207A (en) | 2023-09-18 | 2023-09-18 | Automatic test method, system and medium for identifying software and hardware completed by test case |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116955207A true CN116955207A (en) | 2023-10-27 |
Family
ID=88458650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311196160.3A Pending CN116955207A (en) | 2023-09-18 | 2023-09-18 | Automatic test method, system and medium for identifying software and hardware completed by test case |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116955207A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117675633A (en) * | 2024-02-02 | 2024-03-08 | 苏州跬步信息技术有限公司 | Intelligent hardware equipment testing method and system |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055446A (en) * | 2016-06-24 | 2016-10-26 | 捷开通讯(深圳)有限公司 | Mobile terminal test method and apparatus |
CN109828906A (en) * | 2018-12-15 | 2019-05-31 | 中国平安人寿保险股份有限公司 | UI automated testing method, device, electronic equipment and storage medium |
CN111737141A (en) * | 2020-06-29 | 2020-10-02 | 扬州航盛科技有限公司 | Black box automatic testing system and method combined with deep learning technology |
CN113760300A (en) * | 2021-09-13 | 2021-12-07 | 武汉联影智融医疗科技有限公司 | Software continuous integration method and device, computer equipment and storage medium |
CN113934630A (en) * | 2021-10-12 | 2022-01-14 | 上海复深蓝软件股份有限公司 | Software testing method, device, equipment and medium based on image recognition |
CN114020623A (en) * | 2021-11-04 | 2022-02-08 | 上海复深蓝软件股份有限公司 | Software testing method, device, equipment and medium based on intelligent identification |
CN114546740A (en) * | 2022-01-27 | 2022-05-27 | 深圳亿智时代科技有限公司 | Touch screen testing method, device and system and storage medium |
CN115562989A (en) * | 2022-09-30 | 2023-01-03 | 重庆长安汽车股份有限公司 | Automatic test sequence conversion method, system, equipment and medium |
CN115658523A (en) * | 2022-10-31 | 2023-01-31 | 成都赛力斯科技有限公司 | Automatic control and test method for human-computer interaction interface and computer equipment |
-
2023
- 2023-09-18 CN CN202311196160.3A patent/CN116955207A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106055446A (en) * | 2016-06-24 | 2016-10-26 | 捷开通讯(深圳)有限公司 | Mobile terminal test method and apparatus |
CN109828906A (en) * | 2018-12-15 | 2019-05-31 | 中国平安人寿保险股份有限公司 | UI automated testing method, device, electronic equipment and storage medium |
CN111737141A (en) * | 2020-06-29 | 2020-10-02 | 扬州航盛科技有限公司 | Black box automatic testing system and method combined with deep learning technology |
CN113760300A (en) * | 2021-09-13 | 2021-12-07 | 武汉联影智融医疗科技有限公司 | Software continuous integration method and device, computer equipment and storage medium |
CN113934630A (en) * | 2021-10-12 | 2022-01-14 | 上海复深蓝软件股份有限公司 | Software testing method, device, equipment and medium based on image recognition |
CN114020623A (en) * | 2021-11-04 | 2022-02-08 | 上海复深蓝软件股份有限公司 | Software testing method, device, equipment and medium based on intelligent identification |
CN114546740A (en) * | 2022-01-27 | 2022-05-27 | 深圳亿智时代科技有限公司 | Touch screen testing method, device and system and storage medium |
CN115562989A (en) * | 2022-09-30 | 2023-01-03 | 重庆长安汽车股份有限公司 | Automatic test sequence conversion method, system, equipment and medium |
CN115658523A (en) * | 2022-10-31 | 2023-01-31 | 成都赛力斯科技有限公司 | Automatic control and test method for human-computer interaction interface and computer equipment |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117675633A (en) * | 2024-02-02 | 2024-03-08 | 苏州跬步信息技术有限公司 | Intelligent hardware equipment testing method and system |
CN117675633B (en) * | 2024-02-02 | 2024-04-30 | 苏州跬步信息技术有限公司 | Intelligent hardware equipment testing method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102831052B (en) | Test exemple automation generating apparatus and method | |
CN110941546A (en) | Automatic test method, device, equipment and storage medium for WEB page case | |
CN102567201B (en) | Method for automatically recovering cross-model GUI (graphic user interface) test scripts | |
CN102184138A (en) | Method and system for automatically reproducing and positioning software error | |
CN107179971B (en) | Automatic coding method and system for CAN bus fault processing | |
CN116955207A (en) | Automatic test method, system and medium for identifying software and hardware completed by test case | |
CN112241370B (en) | API interface class checking method, system and device | |
US20060059444A1 (en) | High level validation of designs and products | |
CN115080398A (en) | Automatic interface test system and method | |
CN104320793B (en) | A kind of Automated testing method of cell phone short messages and system | |
CN111338759A (en) | Virtual disk check code generation method, device, equipment and storage medium | |
CN112860587B (en) | UI automatic test method and device | |
CN113535581B (en) | Test script generation method, device, equipment and computer readable storage medium | |
CN112733199A (en) | Data processing method and device, electronic equipment and readable storage medium | |
CN113807077A (en) | Natural language test script parsing processing method and device and electronic equipment | |
CN111078193A (en) | Software development method and system for data analysis system | |
CN111309287A (en) | Method and system for generating software development scheme | |
CN109992475A (en) | A kind of processing method of log, server and storage medium | |
CN115542882B (en) | Controller interface configuration method and device | |
US20230305938A1 (en) | Method and device for determining coverage in hil testing, and storage medium | |
CN117331847B (en) | Automatic test method and system supporting graphic interface | |
CN115242612B (en) | Fault diagnosis method and device | |
CN109884435B (en) | Relay protection device tester, automatic testing method and device | |
CN111367816B (en) | Mobile test method and device, computer equipment and storage medium | |
US20220405063A1 (en) | Source code correction assistance apparatus and source code correction assistance method |
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 |