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

Test case generation method and device and storage medium

A test case generation and model technology, applied in software testing/debugging, design optimization/simulation, error detection/correction, etc., can solve the problem of low accuracy of test cases, avoid explosion problems, improve coverage, and improve efficiency Effect

Pending Publication Date: 2022-03-18
ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF0 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] The main purpose of the present invention is to provide a kind of test case generation method, equipment and storage medium, to solve the problem that the accuracy of the test case generated in the prior art is lower

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 generation method and device and storage medium
  • Test case generation method and device and storage medium
  • Test case generation method and device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

test Embodiment 1

[0055] Figure 4 Flowchart for automatic generation of test cases based on FBD models. Such as Figure 4 As shown, the automatic generation of test cases based on the FBD model generally includes the following steps:

[0056] 401. Analyzing the requirement specification of the software, and extracting the input and output, logical relationship, and constraint relationship in the requirement specification;

[0057] 402. Establishing a model of the FBD language according to the requirement specification;

[0058] 403. Establishing rules for FBD model conversion data combination table;

[0059] 404. Convert the FBD model into a data combination table according to the FBD model and conversion rules;

[0060] 405. Automatically generate test cases according to the data combination table.

Embodiment 1

[0062] In order to solve the above-mentioned technical problems existing in the prior art, an embodiment of the present invention provides a test case generation method.

[0063] Figure 5 The flow chart of the test case generation method embodiment of the present invention, such as Figure 5 As shown, the test case generation method in this embodiment may specifically include the following steps:

[0064] 500. Establish an FSM model according to the trigger conditions for transitions between all software running states and different software running states in the software requirements specification;

[0065] Specifically, the core of establishing an FSM model is action and state. The state is composed of a set of variables and the values ​​of the variables, representing a definite state of the software under test. An action is a combination of a set of operations or a set of variables and changes in variables. Actions are the triggering conditions for transitions between ...

Embodiment 4

[0171] In order to solve the above-mentioned technical problems existing in the prior art, an embodiment of the present invention also provides a device for generating test cases.

[0172] Figure 18 A schematic structural diagram of an embodiment of the device for generating test cases of the present invention, such as Figure 18 As shown, the test case generation device of this embodiment includes an FSM modeling module 181 , an FBD modeling module 182 , an FBD model conversion FSM model module 183 , and an automatic test case generation module 184 .

[0173] The FSM modeling module 181 is used to establish a finite state machine model according to the trigger conditions of transitions between all software running states and different software running states in the software requirements specification;

[0174] The FBD modeling module 182 is used to establish a function block diagram model based on a function block diagram language based on the input and output in the softwa...

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 generation method and device and a storage medium, and the method comprises the steps: building a finite-state machine model and a function block graph model based on a class function block graph language according to a software demand specification; according to the effective state of the function block diagram model, selecting a software running state from the finite-state machine model as a pre-state of the function block diagram model; according to a preset conversion rule, converting the function block diagram model into a conversion finite-state machine model for describing a state change process of software operation, and according to a front state of the function block diagram model, associating the conversion finite-state machine model with a finite-state machine model to obtain a target finite-state machine model; and on the basis of the target finite-state machine model, a preset traversal algorithm is adopted, and each path generates one test case, so that the running process state of the software can be accurately and comprehensively described, the logic relationship between input and output of the software can be accurately described, and the accuracy of the generated test cases is improved.

Description

technical field [0001] The invention belongs to the technical field of software testing for embedded software development, and in particular relates to a test case generation method, device and storage medium. Background technique [0002] Software testing is an important guarantee of software quality. In the field of software testing, the writing of test cases and test scripts has always been an important task of software testing. The quality of test cases and test scripts has an Significant impact, for the same requirements, the quality of test cases and test scripts written by testers of different levels varies greatly, and manual writing of test cases and test scripts is a lot of work and low efficiency. [0003] Model based testing (Model based testing, referred to as MBT) belongs to a testing method in the field of software testing, which automatically generates test cases and test codes by establishing test scenarios or models (hereinafter referred to as models). It ...

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/36G06F30/23
CPCG06F11/3684G06F30/23
Inventor 李宁徐绍龙王雨廖亮王飞王兴安蒋明睿吴斐童金刚
Owner ZHUZHOU CSR TIMES ELECTRIC CO LTD
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