Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for executing test unit

A test unit and test suite technology, applied in software testing/debugging, error detection/correction, instruments, etc., can solve the problems of time-consuming and labor-intensive testing

Pending Publication Date: 2021-09-03
PINGAN PUHUI ENTERPRISE MANAGEMENT CO LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] In the xUnit unit testing framework, when the number of test units that need to be tested is relatively small, the tester can start and execute the test units one by one, but when there are many test units, it is time-consuming and labor-intensive to execute the unit tests one by one

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
  • Method and device for executing test unit
  • Method and device for executing test unit
  • Method and device for executing test unit

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0061] The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.

[0062] see figure 1 , figure 1 It is a flowchart of a method for executing a test unit provided by an embodiment of the present invention. Such as figure 1 As shown, the method for executing a test unit includes the following steps:

[0063] 101. The electronic device receives a determination instruction.

[0064] When the user needs to execute the first test unit to test whether the function implemented by the function code is consistent with the expected function, the electronic device receives the above determination instruction from the user. Exemplarily, the determining instruction may be a determining instruction for the first test unit; or, the determining instruction may be a determining instruction for a target package path, and the target package path indicates obtaining the first test uni...

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 discloses a method and device for executing a test unit, and the method for executing the test unit comprises the steps: receiving a determination instruction; obtaining annotation information of a first test unit according to the determination instruction, wherein the annotation information is used for supplementing information related to the first test unit; under the condition that the annotation information comprises a preset annotation, loading the first test unit into a test suite, wherein the preset annotation is used for marking the first test unit; and executing the first test unit in the test suite. According to the invention, the plurality of first test units can be executed together, so that manpower and material resources are saved; moreover, the first test unit is newly added to the test suite, only the preset annotation needs to be added to the first test unit, the code of the test suite does not need to be modified, and the code opening and closing principle is met.

Description

technical field [0001] The invention relates to the field of software testing, in particular to a method and device for executing a testing unit. Background technique [0002] The test unit is a small piece of code written by the developer, and the execution of the test unit can verify whether the function of the tested code is correct. [0003] In the xUnit unit testing framework, when the number of test units that need to be tested is relatively small, the tester can start and execute the test units one by one, but when there are many test units, it is time-consuming and labor-intensive to execute the unit tests one by one. Therefore, the implementation method of the test suite is proposed in the xUnit unit test framework, and one or more test units to be executed are written into the test suite, so that one or more test units in the test suite can be executed together without starting execution one by one. The test unit saves manpower and material resources. [0004] As...

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
IPC IPC(8): G06F11/36
CPCG06F11/3688
Inventor 李佳任
Owner PINGAN PUHUI ENTERPRISE MANAGEMENT CO LTD