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

Method and device for generating test cases

A test case and test type technology, applied in the field of test case generation, can solve the problems of high maintenance cost of test cases, manual construction, large granularity of unit test support, etc., to achieve diversification of test methods, reduce maintenance costs, and realize automatic generation. Effect

Active Publication Date: 2016-08-17
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] But, in the process of realizing the present invention, the inventor finds that the prior art has at least the following problems: (1) at present, for YII (a kind of component-based, high-performance PHP (Hypertext Preprocessing Language) framework for developing large-scale Web applications ) framework’s unit test case automation technology is not mature enough. For example, PHPUNIT (a lightweight PHP test framework) can implement unit tests, but the granularity of unit test support is too large to realize the automatic generation of function test cases. It is still necessary to manually write test cases; (2) When using the test tools that come with the YII framework, it is still necessary to manually construct test data, resulting in a very high cost of test case maintenance after code upgrades; (3) The unit test coverage logic is not comprehensive; ( 4) The supported test method is single

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 Construction

[0023] Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention. On the contrary, the embodiments of the present invention include all changes, modifications and equivalents coming within the spirit and scope of the appended claims.

[0024] In the description of the present invention, it should be understood that the terms "first", "second" and so on are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance. In the description of the present invention, it should be noted that unless otherwise specified and limited, the terms "connected" and "connect...

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 present invention proposes a method and device for generating test cases, wherein the method includes the following steps: obtaining input instructions and configuration files, wherein the input instructions include test type parameters, and the configuration files include module and class information, and function information of the tested function and test parameters; determine the test type according to the test type parameters, and construct test data according to the test type and test parameters; and render the preset template according to the module and class information, the function information of the function under test and the test data to generate test cases. The method of the embodiment of the present invention, on the one hand, does not need to manually write the test case of the function to be tested, and realizes the automatic generation of the function test case, thereby improving the test efficiency; on the other hand, the test type is determined according to the test type parameter, and the support A variety of different types of test methods make the supported test methods diverse.

Description

technical field [0001] The invention relates to the technical field of software testing, in particular to a method and device for generating test cases. Background technique [0002] Software testing is an important means to improve the reliability of software products and ensure the quality of software products. Software testing activities have been integrated into all stages of the software product life cycle. Various technical methods and testing tools used in software testing have become increasingly mature, and related testing methods, test cases and testing tools are also being continuously improved. Therefore, software testing is progressing towards standardization. [0003] At present, software testing uses different test cases in different testing phases, for example, unit testing phase uses unit test cases, etc., and uses test cases to test various usage scenarios and situations of the software to ensure the correct and safe operation of the system. Test cases ca...

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
Inventor 闫佳阳
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) 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