CN-122027963-A - Method and device for visual automatic test, storage medium and electronic equipment
Abstract
The invention discloses a method, a device, a storage medium and electronic equipment for visual automatic test, which comprise the steps of obtaining a preset basic test event and displaying the basic test event on a visual window of a main control console, calling a target test event from the basic test event through the visual window, configuring and sequencing the target test event and generating a test case script, executing the test case script to obtain an execution result set, analyzing the execution result set and generating a corresponding test analysis report. Compared with the prior art, the method reduces the writing difficulty of test case scripts, improves the test efficiency, can automatically analyze the test results and generate corresponding test analysis reports, improves the intuitiveness of the test results, reduces the workload of subsequent manual analysis, and further improves the test efficiency.
Inventors
- LIU XIMIN
- DU HAIQUAN
- MENG LINGLI
- DING HAIBO
Assignees
- 江西瑞声电子有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251231
Claims (10)
- 1. A visual automatic test method, characterized by comprising the following steps: acquiring a preset basic test event and displaying the basic test event in a visual window of a main control desk; invoking a target test event from the basic test event through the visual window; Configuring and sequencing the target test events and generating test case scripts; Executing the test case script to obtain an execution result set; And analyzing the execution result set to generate a corresponding test analysis report.
- 2. The method for visual automation testing of claim 1, wherein the step of obtaining a predetermined basic test event and displaying the basic test event on a visual window of a console comprises: Acquiring a preset basic test event and attribute information corresponding to the basic test event; classifying the basic test event according to the attribute information and a preset classification mode to obtain an event tree diagram; and displaying the event tree diagram on a visual window of the main control desk.
- 3. The method of claim 2, wherein said step of invoking a target test event from said base test event through said visualization window comprises: Screening out target nodes from the event tree diagram of the visual window; and calling the required basic test event from the basic test events in the target node to serve as a target test event.
- 4. The method of claim 1, wherein the steps of configuring and ordering the target test events and generating test case scripts comprise: configuring a corresponding test environment and a pre-test condition according to the target test event; ordering the target test events to generate corresponding test group items; and generating a test case script based on the test environment, the pre-test condition and the test group item.
- 5. The method of claim 1, wherein the step of executing the test case script to obtain the execution result set comprises: acquiring preset equipment parameter information and preset execution information, and initializing a test environment; executing the test case script according to the equipment parameter information and the execution information to obtain an execution result corresponding to the target test event; and summarizing the execution results to obtain the execution result set.
- 6. The method for visual automation testing as set forth in claim 5, wherein after the step of obtaining the execution result corresponding to the target test event, the method further includes: Detecting whether the execution result of the target test event needs assertion detection or not; If yes, the execution result is subjected to assertion detection, and the detection result is marked on the execution result.
- 7. The method of visual automation testing of claim 6, wherein said analyzing said set of execution results and generating a report of test analysis further comprises, after said step of: Screening out target test events with unqualified execution results from the test analysis report, and marking the target test events as unqualified test events; and calling the disqualification test event to generate an error report file.
- 8. A visual automation test device, comprising: The first acquisition module is used for acquiring a preset basic test event and displaying the basic test event on a visual window of the main control console; The calling module is used for calling a target test event from the basic test event through the visual window; the generating module is used for configuring and sequencing the target test events and generating test case scripts; The execution module is used for executing the test case script to obtain an execution result set; and the analysis module is used for analyzing the execution result set and generating a corresponding test analysis report.
- 9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method of visual automation testing of any one of claims 1 to 7.
- 10. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method of visual automation testing of any one of claims 1 to 7 when the computer program is executed.
Description
Method and device for visual automatic test, storage medium and electronic equipment Technical Field The invention relates to the technical field of automatic testing, in particular to a visual automatic testing method, a visual automatic testing device, a storage medium and electronic equipment. Background With the rapid development of electronic technology, wireless headphones have become an indispensable item for people to travel daily. In the production process of wireless headphones, various tests, especially wireless operation tests and functional tests, are usually performed on the wireless headphones. In the prior art, the operation and the function of the wireless earphone are usually tested by adopting a test script written by a software tester, however, the threshold for writing the test script is relatively high, the overall test efficiency is relatively low, and after the test of the existing wireless earphone is finished, the test personnel is required to check and analyze, so that the automatic generation of the required report and the required bill of lading file cannot be realized. In view of the foregoing, there is a need for a method, apparatus, storage medium and electronic device for visual and automated testing to solve the above-mentioned problems. Disclosure of Invention In view of the defects in the prior art, the invention provides a visual automatic test method, a visual automatic test device, a storage medium and electronic equipment, which solve the problems that test case scripts are difficult to write, the test labor cost is high, the test is relatively low, and a test report cannot be automatically generated. To achieve the above object, a first aspect of the present invention provides a method of visual automation testing, comprising: acquiring a preset basic test event and displaying the basic test event in a visual window of a main control desk; invoking a target test event from the basic test event through the visual window; Configuring and sequencing target test events, and generating test case scripts; Executing the test case script to obtain an execution result set; Analyzing the execution result set and generating a corresponding test analysis report. In a preferred embodiment, the step of acquiring a preset basic test event and displaying the basic test event on a visual window of the main control console includes: Acquiring preset basic test events and attribute information corresponding to the basic test events; classifying the basic test event according to the attribute information and a preset classification mode to obtain an event tree diagram; And displaying the event tree diagram on a visual window of the main control desk. In a preferred embodiment, the step of invoking the target test event from the base test event through the visualization window comprises: screening out target nodes from the event tree diagram of the visual window; And calling the required basic test event from the basic test events in the target node as the target test event. In a preferred embodiment, the steps of configuring and ordering the target test events and generating the test case script include: Configuring a corresponding test environment and a pre-test condition according to the target test event; ordering the target test events to generate corresponding test group items; and generating a test case script based on the test environment, the pre-test conditions and the test group items. In a preferred embodiment, the step of executing the test case script to obtain the execution result set includes: acquiring preset equipment parameter information and preset execution information, and initializing a test environment; executing the test case script according to the equipment parameter information and the execution information to obtain an execution result corresponding to the target test event; and summarizing the execution results to obtain an execution result set. In a preferred embodiment, the step of obtaining the execution result corresponding to the target test event further includes: detecting whether an execution result of a target test event needs assertion detection or not; If yes, the execution result is subjected to assertion detection, and the detection result is marked on the execution result. In a preferred embodiment, the step of analyzing the set of execution results to generate a report of the test analysis further comprises, after: screening out target test events with unqualified execution results from the test analysis report, and marking the target test events as unqualified test events; and calling an unqualified test event to generate an error report file. A second aspect of the present invention provides a visual automation test device comprising: The first acquisition module is used for acquiring a preset basic test event and displaying the basic test event on a visual window of the main control console; The calling module is used for calling the target