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

Unit testing framework and method based on Perl

A unit test and framework technology, applied in the field of C++-oriented unit test framework, can solve difficult problems

Active Publication Date: 2010-05-12
WUHAN HONGXIN TELECOMM TECH CO LTD
View PDF0 Cites 30 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

Because C++ does not have a unified virtual machine framework like .net and java, C++ has a variety of compilers, platforms and programming methods, making it not easy to make and use a general unit testing framework under C++

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
  • Unit testing framework and method based on Perl
  • Unit testing framework and method based on Perl
  • Unit testing framework and method based on Perl

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033] In order to make the purpose, solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific implementation.

[0034] figure 1 A block diagram representing the framework of the invention and the interactions between its modules. The modules of the framework of the present invention and their input and output documents are defined as follows:

[0035]Test suite module M01: is a set of predefined classes and functions within the framework. The TestSuite class is the base class that all written test classes must inherit from. Before writing a test, a test class must be written and inherited from the TestSuite class. Each test class represents a module test, and the test member functions in the test class Represents an interface or unit test. All test classes are combined into test class source file D01.

[0036] Source code parsing module M02: The scrip...

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 universal unit testing device and a method based on a Perl and orienting to C++. The device is established on an operation mechanism, needed information comes from provided source code testing files, a characteristic code in a source code is extracted by using the strong regular expression function of an action scrip language, Perl, and the characteristic code is extracted and replaced, and then re-assembled to a new source code of a test description file. The device adds new tests according to minimum workload to form a test suite, an assertion mechanism is used for determining whether the test is successful or not, the test result is output by a plurality of modes, and the whole process is embedded into a MAKEFILE to lead the test generation and test operation processes to be automated, thus outputting the test running result according to needs. The application of the device can greatly improve testing efficiency and reduce error chances, has extremely obvious advantages especially when building an automatic testing environment, and provides stable guarantee for the quality of projects and products.

Description

technical field [0001] The invention relates to a C++-oriented unit test framework and method independent of development environment and compiler. Background technique [0002] Continuous testing of software and a constant focus on quality are key principles and practices of software development. By analyzing the causes of errors and the trend of errors, it can help project managers find defects in the current software development process, so as to improve in time. This analysis can also help testers design targeted testing methods to improve the efficiency and effectiveness of testing. Current software development emphasizes iterative development to reduce risks and improve software quality. The main advantages of iterative development One is to enable the team to test early and continuously, to continuously validate the quality of the software. Establishing test automation step by step is an effective way to achieve software quality assurance. The purpose of automated t...

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
Inventor 郭波
Owner WUHAN HONGXIN TELECOMM TECH 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