Code validity testing method, computing device and storage medium

A testing method and effectiveness technology, applied in the computer field, to achieve the effect of ensuring quality, development efficiency, and good development habits

Active Publication Date: 2021-08-31
PING AN TECH (SHENZHEN) CO LTD
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to provide a code validity testing method, computing equipment and storage medium, aiming to solve the problems existing in the prior art

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
  • Code validity testing method, computing device and storage medium
  • Code validity testing method, computing device and storage medium
  • Code validity testing method, computing device and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0047] This embodiment provides a code validity testing method, which mainly includes:

[0048] According to the validity test rules including the validity test features, the source codes with UT codes are traversed to judge whether there is content matching the validity test features in the UT codes, and the validity test results are obtained.

[0049] In this embodiment, a validity test rule can be established in advance, and the validity of the source code to be tested can be tested by using the validity test rule.

[0050] The source code is a code file written by the developer in the language supported by the development tool, and a series of computer language instructions are composed of corresponding characters, symbols or signal symbols. The source code generally realizes a complete system function, and the smallest testable units such as classes, modules or functions that make up the source code realize the basic functions that make up the system function. In order t...

Embodiment 2

[0056] In the code validity testing method provided by this embodiment, the validity test rule also includes UT code features, and the UT code features can be UT function keywords, or expressions containing UT function keywords, or classic UT operation code segments, etc. , for example: UT code features can be "unittest", "import unittest", etc.

[0057] The code validity testing method of the present embodiment mainly includes such as figure 1 The flow shown:

[0058] Step S101, locate the UT code in the source code according to the characteristics of the UT code.

[0059] In this embodiment, when there are corresponding UT code features in the source code, one or some UT codes can be quickly located in the source code according to the UT code features.

[0060] Step S102, judging whether there is similar or identical content to the validity test feature in the located UT code, when the UT code has the same content, the validity test result indicates that the UT code is wr...

Embodiment 3

[0064] On the basis of the foregoing embodiments, this embodiment further provides the following content:

[0065] In the code validity testing method provided in this embodiment, the validity test rule also includes a code experience framework for indicating the logical composition of the source code, and the code experience framework includes empirical UT code location indication information. The logical composition of the source code can include: the original basic code for realizing system functions, and UT code. In the actual software development process, developers usually write software code according to certain code writing logic, so that the source code obtained after writing has certain logical composition rules, such as figure 2 The source code shown includes the basic code 201 for realizing the system function and the UT code 202, wherein the basic code 201 includes the first part code 2011 and the second part code 2012, and the first part code 2011 and the second...

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 is applicable to the field of computer technology, and provides a code validity testing method, computing equipment and storage medium. The method includes: detecting the unit test UT code included in the source code according to the validity testing rule containing the validity testing feature Whether there is content that matches the validity test feature in , and the validity test result is obtained. In this way, it is possible to test the validity of UT codes. In the process of code development, developers can know the results of validity tests, and perform corresponding code correction actions based on the results of validity tests, so as to ensure the quality of software codes and development efficiency. , and code validity testing can be introduced as an important consideration in software testing, prompting developers to pay attention to code validity and develop good development habits.

Description

technical field [0001] The invention belongs to the technical field of computers, and in particular relates to a code validity testing method, computing equipment and a storage medium. Background technique [0002] In current software applications, after the software is developed, it is usually necessary to test the software code, and the software testing is mainly used to analyze the correctness of the software and detect the software loopholes. Unit testing (Unit Testing, UT) refers to the detection and verification of the smallest testable unit in the software. The smallest testable unit can be a module, a function, or a class in the software. [0003] When performing software testing, it is usually necessary to determine the completeness of the software, and then evaluate the testing work based on the completeness of the execution, so as to facilitate the adjustment of the software, etc., and improve the software code on this basis. Code coverage is a consideration in s...

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
CPCG06F11/3684G06F11/3688
Inventor 瞿庆徐志成
Owner PING AN TECH (SHENZHEN) CO 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
Try Eureka
PatSnap group products