Ascertaining application test coverage
A technique is directed to ascertaining application test coverage. The technique involves receiving a command to test an application having a set of unmarked sections and a set of marked sections. The command includes a selection parameter that requests at least one of unmarked section coverage results and marked section coverage results. The technique further involves running a test procedure that operates the application to generate section coverage data. The technique further involves, after running the test procedure, generating application coverage results from the section coverage data. The application coverage results describes test procedure coverage of at least one of the set of unmarked sections of the application and the set of marked sections of the application based on the selection parameter of the command.
1 . A method of ascertaining application test coverage, comprising:
building an application having a set of unmarked sections and a set of marked sections from application code having a set of unmarked code portions that build into the set of unmarked sections and a set of marked code portions that build into the set of marked sections, the set of marked sections comprising code for a new feature that is disabled and the set of unmarked sections comprising regular code, wherein building the application includes identifying the set of unmarked code portions and the set of marked code portions within the application code based on a set of text-based markers, and wherein the set of text-based markers comprise exclusion markers that reside after comment symbols and begin and end each one of the marked code portions, thereby distinguishing the code for the new feature that is disabled from the regular code;
receiving a command to test the application, the command including a selection parameter that requests at least one of unmarked section coverage results and marked section coverage results, and wherein the command further includes a first parameter requesting the unmarked section coverage results;
running a test procedure that operates the application to generate section coverage data;
after running the test procedure, generating application coverage results from the section coverage data, the application coverage results describing test procedure coverage of at least one of the set of unmarked sections and the set of marked sections based on the selection parameter of the command; and
after running the test procedure and without rebuilding the application:
receiving another command to test the application, the another command including a second parameter requesting the marked section coverage results,
re-running the test procedure that operates the application to generate marked section coverage data, and
after re-running the test procedure, generating second application coverage results from the marked section coverage data.
2 . The method of claim 1 wherein identifying the set of unmarked code portions and the set of marked code portions within the application code includes:
detecting a first pair of markers that delineate a first marked code portion within the application code, and
detecting a second pair of markers that delineate a second marked code portion within the application code.
3 . The method of claim 2 wherein each unmarked code portion of the set of unmarked code portions is a code portion without a pair of markers.
4 . The method of claim 2 wherein the first marked code portion and the second marked code portion are non-overlapping.
5 . The method of claim 4 wherein the first marked code portion includes a first starting marker of the first pair of markers, first code for a first application operation, and a first ending marker of the first pair of markers;
wherein the second marked code portion includes a second starting marker of the second pair of markers, second code for a second application operation that is different from the first application operation, and a second ending marker of the second pair of markers;
wherein the first starting marker and the second starting marker include a same starting marker keyword to indicate that the first starting marker and the second starting marker are starting markers; and
wherein the first ending marker and the second ending marker include a same ending marker keyword to indicate that the first ending marker and the second ending marker are ending markers.
6 . The method of claim 2 wherein the first pair of markers are different from the second pair of markers.
7 . The method of claim 6 wherein the first marked code portion includes a first starting marker of the first pair of markers, first code for a first application operation, and a first ending marker of the first pair of markers;
wherein the second marked code portion includes a second starting marker of the second pair of markers, second code for a second application operation that is different from the first application operation, and a second ending marker of the second pair of markers;
wherein the first starting marker and the first ending marker include a first unique keyword to uniquely identify the first marked code portion; and
wherein the second starting marker and the second ending marker include a second unique keyword to uniquely identify the second marked code portion.
8 . The method of claim 1 wherein receiving the command includes:
receiving, as the selection parameter, an indicator that selectively has exactly one of:
a first value indicating a request for only coverage results corresponding to the set of unmarked code portions,
a second value indicating a request for only coverage results corresponding to the set of marked code portions, and
a third value indicating a request for coverage results corresponding to both the set of unmarked code portions and the set of marked code portions; and
wherein the first value, the second value, and the third value are different from each other.
9 . The method of claim 8 wherein running the test procedure includes:
launching the application on a test platform to run the application, and
while the application is running on the test platform, inputting a set of test inputs to the application to exercise at least one unmarked section of the set of unmarked sections and at least one marked section of the set of marked sections to generate at least some of the section coverage data.
10 . The method of claim 9 wherein generating the application coverage results from the section coverage data includes:
providing a first report that identifies a first coverage measurement indicating an amount of the set of unmarked sections that were tested when the indicator has the first value,
providing a second report that identifies a second coverage measurement indicating an amount of the set of marked sections that were tested when the indicator has the second value, and
providing a third report that identifies a third coverage measurement indicating an amount of the set of unmarked sections and the set of marked sections that were tested when the indicator has the third value.
11 . The method of claim 1
wherein the application coverage results describe test procedure coverage of the set of unmarked sections, and the second application coverage results describe test procedure coverage of the marked sections.
12 . The method of claim 1 wherein the command to test the application includes a first parameter requesting one of the unmarked section coverage results and the marked section coverage results; and
wherein the method further comprises, after running the test procedure and without rebuilding the application:
receiving another command to test the application, the another command including a second parameter requesting both the unmarked section coverage results and the marked section coverage results;
re-running the test procedure that operates the application to generate other section coverage data; and
after re-running the test procedure, generating other application coverage results from the other section coverage data.
13 . Electronic equipment, comprising:
memory; and
control circuitry coupled to the memory, the memory storing instructions which, when carried out by the control circuitry, cause the control circuitry to perform a method of:
building an application having a set of unmarked sections and a set of marked sections from application code having a set of unmarked code portions that build into the set of unmarked sections and a set of marked code portions that build into the set of marked sections, the set of marked sections comprising code for a new feature that is disabled and the set of unmarked sections comprising regular code, wherein building the application includes identifying the set of unmarked code portions and the set of marked code portions within the application code based on a set of text-based markers, and wherein the set of text-based markers comprise exclusion markers that reside after comment symbols and begin and end each one of the marked code portions, thereby distinguishing the code for the new feature that is disabled from the regular code;
receiving a command to test the application, the command including a selection parameter that requests at least one of unmarked section coverage results and marked section coverage results, and wherein the command further includes a first parameter requesting the unmarked section coverage results;
running a test procedure that operates the application to generate section coverage data;
after running the test procedure, generating application coverage results from the section coverage data, the application coverage results describing test procedure coverage of at least one of the set of unmarked sections and the set of marked sections based on the selection parameter of the command; and
after running the test procedure and without rebuilding the application:
receiving another command to test the application, the another command including a second parameter requesting the marked section coverage results,
re-running the test procedure that operates the application to generate marked section coverage data, and
after re-running the test procedure, generating second application coverage results from the marked section coverage data.
14 . Electronic equipment as in claim 13 wherein running the test procedure includes:
generating the section coverage data while the control circuitry performs data storage operations to respond to host input/output (I/O) requests from a set of host computers.
15 . A computer program product having a non-transitory computer readable medium which stores a set of instructions to process an application, the set of instructions, when carried out by computerized circuitry, causing the computerized circuitry to perform a method of:
building an application having a set of unmarked sections and a set of marked sections from application code having a set of unmarked code portions that build into the set of unmarked sections and a set of marked code portions that build into the set of marked sections, the set of marked sections comprising code for a new feature that is disabled and the set of unmarked sections comprising regular code, wherein building the application includes identifying the set of unmarked code portions and the set of marked code portions within the application code based on a set of text-based markers, and wherein the set of text-based markers comprise exclusion markers that reside after comment symbols and begin and end each one of the marked code portions, thereby distinguishing the code for the new feature that is disabled from the regular code;
receiving a command to test the application, the command including a selection parameter that requests at least one of unmarked section coverage results and marked section coverage results, and wherein the command further includes a first parameter requesting the unmarked section coverage results;
running a test procedure that operates the application to generate section coverage data;
after running the test procedure, generating application coverage results from the section coverage data, the application coverage results describing test procedure coverage of at least one of the set of unmarked sections and the set of marked sections based on the selection parameter of the command; and
after running the test procedure and without rebuilding the application:
receiving another command to test the application, the another command including a second parameter requesting the marked section coverage results,
re-running the test procedure that operates the application to generate marked section coverage data, and
after re-running the test procedure, generating second application coverage results from the marked section coverage data.