Test case generation method based on dynamic symbolic execution

A technology of dynamic symbol execution and test case generation, applied in software testing/debugging, error detection/correction, instruments, etc., can solve problems such as adverse effects, high labor costs, and low degree of automation, and reduce adverse effects and labor costs The effect of low and high degree of automation

Inactive Publication Date: 2019-11-29
EAST CHINA NORMAL UNIVERSITY +1
View PDF4 Cites 6 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the testing methods of existing PLC tools are basically based on manually input test cases, mainly concerned with the needs of users
This method usually requires testers to understand the requirements specification and program structure, is very time-consuming, has a low degree of automation, high labor costs, is prone to adverse effects caused by human factors, and cannot provide information about code coverage after the test is completed

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 based on dynamic symbolic execution
  • Test case generation method based on dynamic symbolic execution
  • Test case generation method based on dynamic symbolic execution

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0036] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0037] According to an embodiment of the present application, a method for generating test cases based on dynamic symbolic execution is proposed, such as figure 1 shown, including:

[0038] S1, the parsing step, modeling the standard function blocks in the input structured text ST source program to obtain an equivalent ST program, using a compiler to parse the equivalent ST program to obtain an abstract syntax tree;

[0039] S2, t...

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 for dynamic symbolic execution. The test case generation method comprises the steps of generating a control flow graph according to an input structured text ST source program; modeling the variable attribute and the standard function according to the control flow diagram, generating an initial test case, substituting the initial test case intothe control flow diagram to execute to obtain a covered path, obtaining a constraint set, determining a candidate path pool according to the constraint set, and selecting one path as an execution path; according to the modeled standard function block, standard function, variable attribute and conversion rule, converting and solving the constraint set on the execution path to obtain a new test case; and storing all test cases obtained by one input source program, determining coverage rate information according to the covered path, and outputting the test cases and the coverage rate information.The test case can be simply and quickly generated by using dynamic symbolic execution, so that adverse effects caused by human factors are reduced; high-quality test cases and correct coverage rate information can be obtained, the automation degree is high, and the labor cost is low.

Description

technical field [0001] The present application relates to the field of software testing, in particular to a method for generating test cases based on dynamic symbolic execution. Background technique [0002] Programmable logic controller (Programmable Logic Controller, PLC), as the core equipment of the industrial control system, has been widely used in various automation control fields. With the scale of PLC software becoming larger and larger and PLC equipment becoming more and more diverse, many problems have broken out in practical applications, which may cause economic losses if they are light, and affect personal safety if they are serious. The IEC 61508 standard clearly states that PLC software must be fully tested in terms of function, structure and safety before release. The first task of software testing is to design test cases for the software to be tested. PLCs employ a cyclic execution model, which makes writing exhaustive test cases especially challenging. H...

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/3676G06F11/3684
Inventor 史建琦苏亭黄滟鸿战云龙孙文圣郝丽
Owner EAST CHINA NORMAL UNIVERSITY
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
Try Eureka
PatSnap group products