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

Program code variation testing method and device

A program code and mutation testing technology, applied in the computer field, can solve the problems of low reliability of mutation testing, achieve the effect of increasing diversity and flexibility, and improving experience

Pending Publication Date: 2022-03-25
AGRICULTURAL BANK OF CHINA
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present disclosure provide a method and device for mutation testing of program codes to solve the problem of low reliability of mutation testing

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
  • Program code variation testing method and device
  • Program code variation testing method and device
  • Program code variation testing method and device

Examples

Experimental program
Comparison scheme
Effect test

test Embodiment 2

[0120] Perform evolution processing on the initial population and generate test case 2. For the description of the corresponding test case, please refer to Figure 6 ; and so on, generating such as Figure 6 Test Case 3, Test Case 4, Test Case 5, and Test Case 6 shown in

[0121] should be understood, Figure 6 The above-mentioned embodiments are only used for exemplary illustration, and the test cases that may be generated in this embodiment should not be construed as limitations on the test cases.

[0122] In this embodiment, on the basis of generating the initial population, population evolution processing is performed based on the requirements of mutation testing, so that the test case set can meet the requirements of mutation testing, thereby improving the reliability and accuracy of mutation testing.

[0123] S306: Execute the test cases in the test case set sequentially according to the order of each test case number, generate the test results corresponding to each te...

test Embodiment t

[0135] Regarding the killable variant: if there is a test case t (the test case belongs to the test case set), and the execution results on the variant p' and the program code p are inconsistent, it is said that the variant p' is relative to the test case set. Can kill mutants.

[0136] Regarding the survivable variant: if there is no test case in the test case set, and the execution results on the variant p' and the program code p are inconsistent, then the variant p' is said to be a survivable variant relative to the test case set.

[0137] The second step: obtaining the third quantity of the variant corresponding to the program code, calculating the quantity difference between the third quantity and the second quantity, and determining the quotient between the first quantity and the quantity difference as the variation score.

[0138] Exemplarily, the variation score MS(M, T) can be determined by formula 1, formula 1:

[0139]

[0140] Among them, killed(M,T) is the first...

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 embodiment of the invention provides a program code variation testing method and device, and the method comprises the steps: obtaining the business scene information of a to-be-tested program code, enabling the business scene information to be the operation logic information of a user when the business service is provided for the user based on the program code, carrying out the recognition processing of the business scene information, obtaining at least one variant, and transmitting the at least one variant to a server; a test case set is generated according to the variants, the test case set comprises a plurality of test cases, each test case has a case number, the test cases in the test case set are sequentially executed according to the sequence of the case numbers, and test results corresponding to the test cases are generated. According to the method and the device, the variation test results of the program codes are determined on the basis of the test results, diversity and flexibility of variation tests are improved, variation tests are performed in combination with the view angle of the user, the variation test results can better meet the requirements of the user, and therefore user experience is improved.

Description

technical field [0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method and device for mutation testing of program codes. Background technique [0002] Mutation Testing, also known as mutation analysis, refers to a software testing method that finds defects in program code by constructing mutants and introducing them into program code, so it is also called fault-based testing. method. [0003] In the prior art, mutation testing is implemented based on program branches and mutants of the program code to be tested. [0004] However, the above method completes the mutation test from the dimension of the function that the tested program code can realize, ignoring the user's perspective, resulting in low reliability of the test results of the mutation test. Contents of the invention [0005] Embodiments of the present disclosure provide a method and device for mutation testing of program codes to solve the proble...

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/36
CPCG06F11/3684
Inventor 侯亚楠王欣苏畅徐伟
Owner AGRICULTURAL BANK OF CHINA
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