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
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
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...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com