Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

An automatic test method based on UnitTest parallel execution

A technology for automated testing and testing, which is applied in the direction of user interface execution, software testing/debugging, error detection/correction, etc. It can solve the problem of unreasonable balance of thread execution time, non-separation of test machine and test script, and serial execution of scripts Inefficiency and other issues, to achieve the effect of saving machine resource requirements, saving test running time, and reducing the trouble of configuring the environment

Active Publication Date: 2018-12-07
INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF2 Cites 14 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Multiple unittest threads can also be run on the same machine to achieve parallel execution, but there is a defect in the parallel method, that is, the execution time of each thread cannot be reasonably balanced, that is, after a certain thread is executed, other threads may have to wait for a long time long time to complete
wasted a lot of testing time
[0003] Moreover, in the field of webUI automated testing, the test machine and the test script are not separated, which consumes hardware resources; the serial execution efficiency of the script is low, and the automated execution time is too long

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • An automatic test method based on UnitTest parallel execution
  • An automatic test method based on UnitTest parallel execution

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0047] The present invention provides a kind of automated testing method based on UnitTest parallel execution, such as figure 1 As shown, the methods include:

[0048] S1, install the docker module on the host machine, and configure the container image based on the docker module;

[0049] S2, start the container image and create a Python module;

[0050] S3, preset the test cases to be executed on the container image;

[0051] S4, use the Python module to search for all test cases in the system, and write the name of the test case into the container image;

[0052] S5, the test file is given a ready state, the unittest test thread is run, and the test case that the read state is prepared is tested on the test file, and the test case state is set as running;

[0053] S6, after the operation ends, if the test case runs successfully, the state of the test file is set to a completed state;

[0054] S7, output a test report on the Python module.

[0055] The present invention ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides an automatic test method based on UnitTest parallel execution, which adopts multi-threads to run test cases at the same time. Compared with a conventional multi-thread running script mode, the method greatly saves the running time of the script and can run the failed test case twice at the same time, thereby improving the test efficiency. Through adoption of the method of multi-thread running test case dynamically, the running time of test case is reduced and the running time of test case is saved. Through introduction of docker container technology into the WebUI automated test method, container images of a test environment are customized through docker container technology, and multiple test environments are started through the container images, so the problem of troublesome environment configuration by executors is reduced, and the demand of physical machines is reduced.

Description

technical field [0001] The invention relates to the field of server testing, in particular to an automated testing method based on UnitTest parallel execution. Background technique [0002] In the field of webUI automated testing, the way to automate the execution of test cases is generally achieved by means of third-party test suites. For example, in the automated testing written in python, unittest is generally used to automate the running of test cases. Unittest can realize the pre-set The test cases are executed sequentially, and the test results are output after execution. Multiple unittest threads can also be run on the same machine to achieve parallel execution, but there is a defect in the parallel method, that is, the execution time of each thread cannot be reasonably balanced, that is, after a certain thread is executed, other threads may have to wait for a long time It takes a long time to complete. A lot of testing time is wasted. [0003] Moreover, in the fie...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/36G06F9/451
CPCG06F11/3664G06F11/3688G06F9/451
Inventor 王亮
Owner INSPUR SUZHOU INTELLIGENT TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products