Method and device for generating test cases used for software module testing
A technology of test cases and software modules, applied in the direction of software testing/debugging, can solve the problem of high cost, achieve the effect of quality assurance, improve effectiveness, and reduce test cost
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment approach
[0023] see figure 1 , which illustrates Embodiment 1 of a test case generation method for software module testing of the present invention. According to various embodiments of the present invention, the test case includes a positive example and a negative example, the positive example refers to a test case that takes a value according to a predetermined correct value and obtains an expected logical result, and the negative example refers to a test case that does not follow the established correct value A test case where the correct value is taken and the expected error result is obtained.
[0024] In embodiment 1, the test case generation method for software module testing comprises:
[0025] Step S101, dividing the input field into fields of different levels according to the attributes of the input field of the software module;
[0026] Step S102, analyzing and obtaining values for fields of different levels;
[0027] Step S103, filling the value into an executable test ...
Embodiment 2
[0036] see figure 2 , which illustrates Embodiment 2 of a test case generation method for software module testing of the present invention.
[0037] In embodiment 1, the test case generation method for software module testing comprises:
[0038] Step S201, sorting out the input fields of the software module, as shown in Table 1, the software module has 7 input fields, which are briefly represented as F1-F7.
[0039] Table 1:
[0040] F1
F2
F3
F4
F5
F6
F7
[0041] Step S202, analyzing the input fields and dividing the field levels, specifically, obtaining the attributes of the input fields, and dividing the input fields into key fields, main fields, auxiliary fields and Associated field.
[0042] For example, through hierarchical analysis, the input fields of this software module are distributed as follows:
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 