Eureka AIR delivers breakthrough ideas for toughest innovation challenges, trusted by R&D personnel around the world.

Method and system for checking unit test quality

A unit test and unit inspection technology, applied in the computer field, can solve problems that affect the effectiveness of unit tests and the quality of unit tests cannot be well guaranteed, and achieve the effect of improving effectiveness

Active Publication Date: 2016-04-20
ALIBABA GRP HLDG LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] At present, although the code coverage rate of unit tests has been improved, the effectiveness of unit tests has been affected because the quality of unit tests cannot be well guaranteed.

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 checking unit test quality
  • Method and system for checking unit test quality
  • Method and system for checking unit test quality

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] The embodiment of this application provides a method for checking the quality of unit tests, such as figure 1 shown, including:

[0031] Step 101, use the aspect-oriented programming method to obtain the test metadata corresponding to the test element according to the preset primitive language used to describe the test element; further, this step includes: according to the target aspect dimension, from the unit test set and / or the target The application obtains the target aspect information; subdivides the target aspect information into the smallest unit of test information, and the smallest unit of test information is the test element, and stores the test element and its corresponding test metadata in memory; obtains the preset The metalanguage, using the preset metalanguage, the association between the test element and the test metadata, obtains the test metadata corresponding to the test element from the memory. Preferably, in order to increase the operation speed o...

Embodiment 2

[0037] Such as figure 2 Shown is the application architecture diagram of the method for checking the quality of unit tests. The architecture diagram uses the programming language jdk1.6 and above, the development framework is maven3, and the extension package depends on ASPECTJ1.5 or above, but the programming language used, the development Frameworks and extension packages are just examples, and the scope of protection of this application is not limited thereto. exist figure 2 In , the architecture includes: the ASPECTJ framework, the target application, a suite of unit tests, and a system for checking the quality of the unit tests.

[0038] The ASPECTJ framework acts as a running proxy for the target application and at the same time acts as a supporting tool for the system that checks the quality of the unit tests. It should be noted that, due to the different programming languages ​​used, the framework that acts as a supporting tool can be selected according to the diff...

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 detecting unit test quality, and belongs to the field of computers. The method includes that an aspect oriented programming mode is utilized, and test unit data corresponding to a test unit are obtained according to the preset meta-language which is used for describing the test unit; checking rules of a unit test case are obtained; the unit quality is detected according to the test unit data and the checking rules of the unit test case; a quality test result of the unit test is output. The system comprises a test unit acquisition module, a test unit data acquisition module, a checking rule acquisition module, a rule testing module and an output module. By means of the method and the system for detecting unit test quality, validity of the test unit can be improved.

Description

technical field [0001] The application relates to the field of computers, in particular to a method and system for checking the quality of unit tests. Background technique [0002] A unit test is a small piece of code written by a developer to verify that a small, well-defined function of the code under test is correct. Generally speaking, a unit test is used to judge the behavior of a specific function under a specific condition (or scenario). For example, it may be necessary to put a large value into an ordered list (list), and then make sure that the value appears at the end of the list. [0003] Unit testing is the lowest level of testing activity to be performed during software development, in which an independent unit of software is tested in isolation from the rest of the program. Unit testing is not just a one-off development process used as an aid to error-free coding, unit testing must be repeatable, whether in the process of software modification, or porting to ...

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 ALIBABA GRP HLDG LTD
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
Eureka Blog
Learn More
PatSnap group products