Supercharge Your Innovation With Domain-Expert AI Agents!

Method and device for generating test cases

A test case generation and test case technology, applied in software testing/debugging, error detection/correction, instrumentation, etc., can solve problems such as large randomness, low efficiency, and reduced adequacy of Simulink model testing, achieving short time and improving Effects of generating efficiency and improving adequacy

Active Publication Date: 2018-12-14
BEIJING RUNKE GENERAL TECH
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For the test cases of the look-up table widely used in simulation control, it can only be completed by manual design, which is more random and less efficient; when the look-up table is more complex, the test cases are larger and the integrity of the test cases cannot be guaranteed. , leading to a reduced adequacy of testing the Simulink model

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 generating test cases
  • Method and device for generating test cases
  • Method and device for generating test cases

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] In this embodiment, a test case generation method is provided, please refer to figure 1 , can include the following steps:

[0048] Step S11: Obtain each breakpoint sequence of the lookup table in the Simulink model under test.

[0049] The breakpoint sequence is used to describe the index of the lookup table, and the elements in the breakpoint sequence divide the interpolation input set into a plurality of sub-data regions.

[0050] In this embodiment, the interpolation input set is a set of input values ​​of the above lookup table. Wherein, the input value of the lookup table is used as an index value of the data in the lookup table, that is, the data in the lookup table corresponding to the input value can be determined according to the input value of the lookup table.

[0051] It should be noted that the elements in the breakpoint sequence are one or several input values ​​in the interpolation input set.

[0052] In this embodiment, the number of breakpoint seque...

Embodiment 2

[0086] In this embodiment, corresponding to the above method embodiments, a device for generating test cases is provided, please refer to Figure 6 , the test case generation device includes: an acquisition unit 51 , a first generation unit 52 and a second generation unit 53 .

[0087] Acquisition unit 51 is used to obtain each breakpoint sequence of the look-up table in the tested Simulink model, and the breakpoint sequence is used to describe the index of the look-up table, and the elements in the breakpoint sequence divide the interpolation input set into a plurality of subsections data area.

[0088] The first generating unit 52 is configured to generate an intermediate sequence corresponding to each of the breakpoint sequences, and the intermediate sequence is composed of representative values ​​of each of the sub-data regions.

[0089] The second generation unit 53 is configured to generate a lookup table test case according to each of the intermediate sequences.

[00...

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 provides a test case generation method and apparatus. The test case generation method comprises the steps of obtaining breakpoint sequences of a query table in a tested Simulink model; generating intermediate sequences corresponding to the breakpoint sequences; and generating query table test cases according to the intermediate sequences. Through the method and the apparatus, the generation efficiency of the query table test cases is improved and the sufficiency of tested Simulink model testing is enhanced.

Description

technical field [0001] The present application relates to the technical field of software testing, in particular to a test case generation method and device. Background technique [0002] With the rapid development of science and technology, Simulink model simulation is widely used in important fields such as aviation, aerospace, automobiles, ships, artillery, and finance. In order to ensure the correctness and reliability of the Simulink model, it is necessary to fully test the Simulink model. [0003] In Simulink model testing, coverage is a measure of the adequacy of testing. For the test cases of the look-up table widely used in simulation control, it can only be completed by manual design, which is more random and less efficient; when the look-up table is more complex, the test cases are larger and the integrity of the test cases cannot be guaranteed. , resulting in reduced adequacy of Simulink model testing. Contents of the invention [0004] For solving the above...

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
CPCG06F11/3684G06F11/3688
Inventor 钟贞
Owner BEIJING RUNKE GENERAL TECH
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More