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

Method and system for automatically generating unit test input data and test case

A technology for inputting data and unit testing, applied in the field of computer programming, can solve the problems of shortening time, error-prone, and time-consuming unit test cases, etc.

Pending Publication Date: 2022-04-05
BEIJING LUSTER LIGHTTECH
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In order to solve the problems of manually writing unit test input data, unit test cases, time-consuming, low efficiency, and error-prone problems in the prior art, this application provides a method and system for automatically generating unit test cases. The method can be used for different units under test Automatically generate personalized unit test cases in batches, thereby greatly reducing the time for writing unit test input data and unit test cases, improving work efficiency and reducing error rates

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 system for automatically generating unit test input data and test case
  • Method and system for automatically generating unit test input data and test case

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0062] Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of approaches consistent with aspects of the invention as recited in the appended claims.

[0063] The method and system for automatically generating unit test input data and test cases provided by the present application will be described in detail below through specific embodiments.

[0064] First, a brief introduction to the usage scenarios of this solution.

[0065] A software system usually includes multiple unit modules, and each unit module is independent of each other and cooperates with e...

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 method and a system for automatically generating a unit test input data set and a test case. The method for automatically generating the unit test input data set comprises the following steps: respectively generating basic normal unit test input data, limit unit test input data and abnormal unit test input data according to a normal value range and an abnormal value range of each input parameter, and automatically screening the data; further selectively deriving the basic normal unit test input data according to the screening result until the screening result meets a termination condition; according to the method for automatically generating the unit test case, the corresponding relation is established between the expected result and the corresponding unit test input data, so that the problems of long time consumption, low efficiency, high error rate and the like of manually compiling the unit test input data and the unit test case in the prior art are solved; the time for writing unit test input data and unit test cases is greatly shortened, the working efficiency is improved, and the error rate is reduced.

Description

technical field [0001] The application belongs to the field of computer programming, in particular to a method and system for automatically generating unit test input data and test cases. Background technique [0002] With the application of software in all walks of life more and more widely, the stability of software has been paid more and more attention. Therefore, software testing is an important task in the process of software development. Since the whole software usually includes a plurality of unit modules, the process of testing the software is usually to first test each unit module separately, and then to test the whole software after each unit test is passed. Through unit testing, the smallest measurable unit in the software can be inspected and verified, helping developers to carry out code self-examination, discovering logic errors in software system design or implementation, so that problems can be exposed early, and it is convenient to analyze the existing probl...

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/36
Inventor 韩鹏安登奎戴志强姚毅杨艺
Owner BEIJING LUSTER LIGHTTECH
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