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

Test case self-adaptive random generation method for metamorphic test

A technology of random generation and transformation testing, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as large amount of distance calculation and no support for difference measurement, achieving low memory consumption, low computational cost, fast effect

Active Publication Date: 2021-12-10
NANHUA UNIV
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, this method has three deficiencies: (1) It does not support a metamorphic test case MTC containing multiple test inputs, and the existing adaptive random generation method does not support the difference measurement of this structure; (2) For the MTC with multiple input parameters (high-dimensional input) program, the calculation of distance is large; (3) when there is a large difference in the dimension of the input parameter, the calculation result based on distance or density depends on the parameter with a large value, such as n-dimensional input {x1,x2 ,...,xn}, the value ranges of x1 and x2 are (0,1) and (-100,10000) respectively, then the influence of x2 on the distance will be significantly greater than that of x1, which is easily affected by the dimension of the input parameters

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
  • Test case self-adaptive random generation method for metamorphic test
  • Test case self-adaptive random generation method for metamorphic test

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments.

[0031] Refer to attached figure 2 , taking the sine function sin as an example, this implementation includes the following steps,

[0032] (1) Initialization: Assume that the input domain [0,2π] is divided into [0,1], (1,π], (π,5], (5,2π], assuming that there is no executed test case, according to the input The domain randomly generates a batch and puts it into C RTC =Random(0,2π,10)={π / 3,2,3,...,5π / 3};

[0033] (2) Check whether all partitions of all parameters have been covered: if all partitions of all parameters include at least one test case, stop the test if the detection result is true, otherwise perform the next step;

[0034] (3) Select the non-covered partition and randomly generate a test case set for transformation: randomly generate 10 initial test inputs C in the interval [0,1] STC =Random(0,1,10)={0.1,0.2,...,1}, the transf...

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 test case self-adaptive generation method for a metamorphic test. The test case self-adaptive generation method comprises the following steps: (1) initializing; (2) checking whether all partitions of all parameters are covered or not; (3) selecting uncovered partitions, and randomly generating a metamorphic test case set; (4) calculating the distance between the initial input and the subsequent input; (5) taking a group of metamorphic test inputs with the maximum distance as candidate inputs; (6) calculating an abnormal score of the candidate input relative to the result set; and (7) removing the candidate input with the abnormal score smaller than the threshold value, if the candidate input set is empty, returning to the step (3), and otherwise, returning to the step (2). The invention supports the metamorphic test, and automatically generates the test case until all the input partitions at least comprise one test input; differential measurement of initial test input and subsequent test input is supported, difference measurement of test input and a result set is supported, a measurement result is not affected by parameter dimensions, the possibility of discovering defects is improved, and a small data set is supported.

Description

technical field [0001] The invention relates to a test case self-adaptive random generation method, in particular to a test case self-adaptive random generation method for metamorphosis testing. Background technique [0002] Scientific computing and industrial design software such as nuclear design and safety analysis software and aeroengine power design simulation software that use numerical simulation, usually do not have analytical solutions due to the need to solve complex partial differential equations. High problem, known as the Oracle problem of software testing. Traditional testing methods verify the program under test by directly comparing the actual results with the expected results. The Oracle problem makes it difficult to fully test the above-mentioned software. Without sufficient testing, it is difficult to guarantee the quality of the software. [0003] Metamorphic testing (MT) is currently recognized as one of the effective methods to solve Oracle problems. I...

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/3684
Inventor 李萌王丽君阳小华闫仕宇刘杰万亚平李丰源任长安陈珍平谢金森赵鹏程于涛
Owner NANHUA UNIV
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