Driving function and stub function generating method based on Perl

A driver function and stub function technology, which is applied in the field of Perl-based driver function and stub function generation, can solve the problems of heavy workload of driver function and stub function, time-consuming test environment configuration, and difficult reuse and management of test data. Achieve the effects of improving test efficiency, powerful text processing capabilities, and facilitating management and reuse

Inactive Publication Date: 2013-03-06
CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
View PDF4 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The first method is characterized by free and flexible operation and simple use, but the workload of manually writing a large number of driver functions and stub functions is heavy, and it is difficult to reuse and manage test data
The second method is to input test-related information through

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
  • Driving function and stub function generating method based on Perl
  • Driving function and stub function generating method based on Perl
  • Driving function and stub function generating method based on Perl

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0038] The test case description file is written in XML format, and the generated test drivers and stub functions are required to comply with the C language rules.

[0039] Please refer to figure 1 , the specific implementation is as follows:

[0040] 1. Write a test case description file in XML format:

[0041] with keywords Identify the unit under test information;

[0042] with keywords Identify the called function information;

[0043] with keywords Identify the type of test;

[0044] with keywords Identify test case initialization information;

[0045] with keywords Identify global input variable information;

[0046] with keywords Identify input parameter information;

[0047] with keywords Identify the expected output information of the test case;

[0048] with keywords Identifies piling information.

[0049] 2. Write a test auxiliary module to modularize some commonly used test operations: define Testing_Begin and Testing_End to define 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 driving function and stub function generating method based on Perl. The method comprises the following steps: a test case description file identified by keywords and adopting a text format is written; a test aided module is written; the test case description file is resolved with a Perl script according to the keywords; and a test driving function and a stub function are automatically generated with the Perl script. A test case is described with a text file in a specific format and is written flexibly, and the management and the reusing of test data are facilitated. The method disclosed by the invention has the advantages of improvement in test efficiency, convenience in realization, high operation speed, enhancement in readability and the like.

Description

technical field [0001] The invention relates to the field of software unit testing, in particular to a driving function and pile function generation method based on Perl. Background technique [0002] Unit testing is the earliest dynamic testing activity in the software development process, and it is a test for the smallest independent unit of software. A software unit can be a function, a class. Unit tests by class are generally more complicated, and the actual tests are mainly based on functions. [0003] Functional and logical defects in the code and even problems in software design can be found earlier through unit testing, which is very useful for improving the robustness and stability of the software. And testing the software as early as possible in the life cycle will reduce the difficulty of subsequent testing and maintenance work, saving project costs and expenses. [0004] As the scale of current software becomes larger and the logic becomes more and more comple...

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/36G06F9/44
Inventor 沈良霞
Owner CHINESE AERONAUTICAL RADIO ELECTRONICS RES INST
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