Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

A Metamorphosis Test Case Generation Method Based on Adaptive Random Strategy

A test case and random strategy technology, applied in the field of metamorphic test case generation, the metamorphic test case generation field based on adaptive random strategy, can solve the problems of lack of test coverage, insufficient effectiveness, etc., to improve effectiveness and coverage, Simple generation method and improved dispersion effect

Active Publication Date: 2017-10-03
PLA UNIV OF SCI & TECH
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Although this universal random value testing technique is simple, it does not provide useful information for test coverage in the process of test case generation, and has a certain degree of blindness, so its effectiveness is generally considered not high enough compared with other testing techniques

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
  • A Metamorphosis Test Case Generation Method Based on Adaptive Random Strategy
  • A Metamorphosis Test Case Generation Method Based on Adaptive Random Strategy
  • A Metamorphosis Test Case Generation Method Based on Adaptive Random Strategy

Examples

Experimental program
Comparison scheme
Effect test

Embodiment approach

[0038] A kind of transformation test case generation method based on self-adaptive random strategy of the present invention, such as figure 1 shown, including the following steps:

test Embodiment OTC, test Embodiment test Embodiment F

[0039] Step 1 For the software under test, a group of original test cases OTC is randomly generated by random value strategy, and the corresponding additional test cases FTC are generated by the original test cases according to the input relationship of the metamorphic relationship; the original test case OTC and the additional test case FTC constitute a set of Select test cases OTC and FTC, the number of selected test cases OTC and FTC is |OTC|+|FTC|, where |OTC| represents the number of original test cases, and |FTC| represents the number of additional test cases.

[0040] Step 2 is based on a group of selected test cases OTC and FTC generated in step 1, and adopts an adaptive random strategy to generate the next group of test cases, including the following sub-steps:

[0041]Sub-step 1 divides the input domain of the software under test into |OTC|+|FTC|+1 subdomains; The number of (|OTC|+|FTC|) is 1 more, so it can be ensured that there is at least one subdomain that does n...

Embodiment

[0056] In order to illustrate the test case generation and selection process of the present invention in detail and clearly, this example takes a software program P that realizes the [P(x)]=sin(x) function as an example to describe in detail. The software program P is used to calculate y=sin(x). For this procedure, it is easy to obtain its metamorphic relationship MR sin1 :

[0057] MR sin1 : sin 2 (x)=sin(x+y)*sin(x-y)+sin 2 (y), namely:

[0058]

[0059] Among them, {x 1 , x 2} is the transformation relation MR sin1 The original test case to the metamorphic relation MR sin1 Based on the input relationship of , generate additional test cases {x 3 , x 4}.

[0060] Step 1: For the software P under test, a group of original test cases OTC is randomly generated using a random value strategy, and the corresponding additional test cases FTC are generated by the original test cases according to the input relationship of the above-mentioned metamorphic relationship.

...

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 transformation test case generation method based on an adaptive random strategy, that is, the test case is randomly and automatically generated based on the adaptive strategy. First, the first group of original test cases is randomly generated, and additional test cases are generated according to the metamorphic relationship, and the two constitute the selected test cases; secondly, the input domain is divided to obtain the sub-domains that are not covered by the selected test cases; thirdly, Randomly generate multiple test cases in this subdomain, select a group of test cases as candidate original test cases, and generate additional test cases according to the metamorphic relationship; finally, according to the distance between the candidate test cases and the selected test cases, and The distance between the candidate original test case and its additional test cases, the test case with the largest distance is selected as the next set of test cases. The test case generation method of the invention is simple and clear, and greatly improves the dispersion, effectiveness and coverage of the test case in the input field.

Description

technical field [0001] The invention relates to a method for generating a metamorphosis test case, in particular to a method for generating a metamorphosis test case based on an adaptive random strategy, and belongs to the technical field of software metamorphosis testing. Background technique [0002] Metamorphic Testing (Metamorphic Testing) is an effective and practical means to solve the problem of software testing judgment. The original intention of this testing technology is to generate additional test cases based on the existing test cases through the metamorphic relationship, and then check whether the two test cases satisfy the metamorphic relationship through the corresponding metamorphic relationship. The former test case is called the original test case of metamorphosis test, referred to as the original test case (Original Test Cases: OTC). The latter test case is the additional test case of the transformation test, referred to as the additional test case (Follo...

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 Patents(China)
IPC IPC(8): G06F11/36
Inventor 惠战伟黄松李辉饶莉萍王梅娟吕学伟
Owner PLA UNIV OF SCI & TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Eureka Blog
Learn More
PatSnap group products