In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
How to use ThreadingTest to improve the efficiency of Software Security testing (part two)
Method 3: visual code structure analysis function call diagram:
You can show users a series of overall information about the software system. For example, the total number of classes or functions and the member functions of the class, the depth, hierarchy, total lines of statements and overall complexity of the call relationship or class inheritance relationship, and the overall test coverage (the result of the accumulation and the result of the last run Optional statements, branches and MC/DC test coverage criteria), overall performance analysis results and the proportion of time spent by each module, as well as the analysis results of global and static variables, etc. At the same time, the specific information of each module is given, including the number and complexity of source code lines of each module, the results of test coverage analysis, fan in and fan out information, highlighting a module and all its related modules. or take any module as the root to generate a local subtree and so on.
Features of the function call graph:
1. Supports ultra-high-speed graphics rendering technology at the level of millions of elements.
two。 Support full-screen and ultra-smooth zoom in and out technology, smooth mobile technology.
3. Support according to class grouping aggregation layout and function call relationship layout, the number of levels can be freely defined.
4. Support step-by-step subtree expansion and drilldown functions.
5. Support the coverage display on function elements, as well as the display of coverage and function-related information.
6. Traceability: the function call diagram is "alive", not static. You can select any module in the diagram to trace all the paths and related modules that call it, as well as the modules that he has called, to modify the prevention of module inconsistency defects.
7. You can interoperate, such as highlighting a module and its related modules, or drawing the invocation relationship of a module separately.
8. Any module in the function call graph can be selected to generate the local subgraph for the root, and the relevant information of the subgraph can be generated, so that each group or individual of the team can easily get the relevant local information.
9. Realize the link between each module and logic block diagram: complete the combination of macro (function call diagram) and micro view (control flow chart) to play a better visualization effect.
Function call aggregation diagram:
The functions are grouped by classes, and the functions of the same class are grouped together and displayed by charts.
Class inheritance diagram:
Shows the integration and derivation relationships of all classes in the current project.
Control flow chart
Draw the display diagram of the flow relationship through the if-else,while,for,do-while,switch-case and other control statement structure of the function; with the source code display interface below, the display can clearly view the internal operation logic and structure of the function, the true and false operation status of the conditions, the satisfaction rate of MC/DC, and so on.
Properties:
1. Visual control flow chart, the main control logic statements should have a clear display of elements, support nested display and series display.
two。 Click on each element of the control flow diagram to see the corresponding code segment as well as the number of execution times and coverage of the code segment.
3. In the code segment of the control flow graph, when the conditional statement becomes a selected hot spot, you can see the true or false execution of various combinations of the sub-conditions of the conditional statement.
4. Support thumbnail display, smooth zoom and full screen display.
5. It can be automatically linked, traced and converted with the function call diagram.
List of functions:
For all the functions of the whole program, it is sorted according to various coverage and complexity, which helps users to quickly locate and view all the function information. and through the fast switching of function call chart, control flow chart, coverage visualization chart and cumulative coverage chart, it makes it convenient for users to view and solve practical problems.
Use ThreadingTest code visualization for security testing
In the process of security testing, it is usually necessary to detect the design errors of the code, and the CallGraph provided by TT can reverse engineer the program logic. through the reverse analysis results, the testers can obtain the visual program call structure diagram, that is, the graphical expression of the program design, through the function call logic relationship expressed by CallGraph and the program control flow expressed by ControlFlow. Can assist developers and testers to quickly detect program design errors.
Check code simplicity and comment clarity through ThreadingTest
TT supports standard formatting according to the control flow characteristics of the program, so the log of the formatting process is to check the standardization of code writing.
Through the static analysis function of TT, it can detect the syntax that is not recommended, such as function recursive calls and goto statements.
Using ThreadingTest for code complexity analysis and security check
Complex software is unstable and cannot withstand unpredictable behavior. Therefore, we try to reduce the complexity of the software. If some automation tool is used conditionally, the software design or / and code can be controlled by the tool, and the control flow and data flow in the software structure can be reflected graphically. Through the check of some structural relations, such as the number of connections / calls, the number of nodes, the depth of nesting and so on, the measure of complexity can be obtained, which will achieve good results.
In the process of code analysis by TT, TT can directly give the calculation results of code complexity. Generally, software modules with higher complexity are more likely to introduce defects and security problems, and highly complex data structures are difficult to test thoroughly. Complexity assessment techniques such as TT can be used to mark areas that need to be further improved in order to improve the security of the software.
Method 4: full testing and redundant code analysis of system-level white-box testing technology
TT supports sustainable testing technology in the process of functional testing, that is, coverage merging. For multiple versions, intelligent coverage merging is realized. Based on the above-mentioned function-level multi-version comparison, through the coverage merging algorithm, the cumulative coverage of the current latest version is accurately calculated, thus greatly reducing the repeated testing work of test engineers.
Through TT's system-level white-box testing function, we can deploy TT during functional testing, and then summarize the white-box coverage of all test cases. After multiple rounds of testing, TT can clearly show the uncovered code. From a security point of view, these codes can be divided into two categories:
1. Some of the code is junk or does not reach the code, from a security point of view, these codes are potential security threats and need to be dealt with.
two。 The software testing process is not sufficient, these unexecuted code, there are likely to be potential security vulnerabilities, the need to supplement use cases for testing to ensure the comprehensiveness and adequacy of testing.
At present, the ThreadingTest personal version is free to use. You can learn more on the technology website at www.teststars.cc, and you can also download it on the nebula testing website: if you have any questions during installation and trial, you can join the QQ technology group-"symbol execution-threading test". The QQ number is "339834199".
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.