Purecoverage

zhaozj2021-02-16  59

Purecoverage

PURCOVERAGE is a more effective code cover inspection tool. With it you can quickly understand the coverage of the designed white box test case, a valid standard for the amendment of the white box test case, which is promised Click on the code path. Below is the function of it, I have made some records when I use, I hope to have everyone.

1σ (Merge Runs)

Analysis and statistics for multiple tests, you can see the current case coverage code, there are not covered by those code; sometimes you run how much code for test cases, there is no record, then you need to run for all Test, see if there is any code that is not overwritten, then this feature is very useful, you can code all the tests that have been tested, thus discovering the code that is not tested.

2δ (Compare Runs)

For the measurement of the two codes, the path is compared. Since the test case is more, I can't judge what the difference in the code coverage path of the two cases is to compare the two people, thus finding the difference.

FunctionList

The number of lines used to display the total lines in the function, the number of lines executed, the number of lines that do not execute, the percentage of the code, the relevant module, the file with the original code. Figure:

From here you can see the operation of each function. If you want to know that there are those codes in the function, you need anNNOTATED SOURCE, or double-click the function.

Annotated Source

When we choose MAIN, we entered the code analysis interface, we can see the detailed execution of the code of the main () function, as shown:

In the case of the case, I entered 4 and 5, then you can see that the execution of the code is executed, but the path of m_choice = 4 and 5 is executed, but for m_choice = 1, 2, 3 or 6 ..., etc. Wait, you must design a test case for supplement, so that the code coverage is, huh, huh. Below I have implemented a supplementary case, you can see that the code coverage:

You can see that the code is only 4 no execution, huh, huh, because the exiting must choose 5, so count << "bye! / N";

Return 0; also executed, if the two test procedures pass through the above synthesis, I can see that I have completed 100% override.

skills

PAUSE / Recording: When you find that some unwanted test flows during the test, you can use this feature to test control, you can stop the record to let the program go to the function you want to test, then start the record, The process you need is recorded.

CLEARDATA: When you find the previous test case, if you have already returned, you need to re-do it, which is completely unnecessary, you can use ClearData to clear the previous test results, then continue your valid Test case, which can not be tested without interrupt.

Snaphot Data: Snapshot of the test in the test, you can perform data snapshots on different phases of the execution of the test case, so that you can get the situation after each case execution without need to restart the test multiple times, huh.

转载请注明原文地址:https://www.9cbs.com/read-25455.html

New Post(0)