US 11,983,097 B2
Ranking tests based on code change and coverage
Tonworio Oguara, Everett, WA (US); Xu Jian, Shanghai (CN); Chen Sun, Seattle, WA (US); and YuChan Lo, Taoyuan Dist. (TW)
Assigned to EMC IP HOLDING COMPANY LLC, Hopkinton, MA (US)
Filed by EMC IP Holding Company LLC, Hopkinton, MA (US)
Filed on Jul. 26, 2021, as Appl. No. 17/385,692.
Prior Publication US 2023/0025441 A1, Jan. 26, 2023
Int. Cl. G06F 11/36 (2006.01)
CPC G06F 11/368 (2013.01) [G06F 11/3676 (2013.01); G06F 11/3684 (2013.01); G06F 11/3688 (2013.01); G06F 11/3692 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A system, comprising:
a processor; and
a memory that stores executable instructions that, when executed by the processor, facilitate performance of operations, comprising:
identifying a file comprising computer-executable instructions, wherein the file has been modified since the file was last transformed into a computer-executable program on which a group of tests was performed;
for respective changed lines of the file and for respective first tests of the group of tests that test the respective changed lines, determining respective line coverage ratios that represent respective ratios between the respective ones of the respective changed lines that are tested by the respective first tests and respective total changed lines in the file;
for respective changed functions of the file and for respective second tests of the group of tests that test the respective changed functions, determining respective function coverage ratios that represent respective ratios between the respective ones of the respective changed functions that are tested by the respective second tests and respective total changed functions in the file;
for respective changed branches of the file and for respective third tests of the group of tests that test the respective changed branches, determining respective branch coverage ratios that represent respective ratios between the respective ones of the respective changed branches that are tested by the respective third tests and respective total changed branches in the file;
selecting an updated group of tests from the group of tests based on the respective line coverage ratios, the respective function coverage ratios, and the respective branch coverage ratios, based on a first test of the respective first tests having a line coverage ratio greater than a threshold value,
wherein the threshold value is greater than zero, wherein the updated group of tests comprises a subgroup of the group of tests, and based on respective failed or failing tests of respective tests of the group of tests,
wherein a failure of a prior version of the computer-executable program was identified when tested with the respective failed or failing tests,
wherein the first test is selected based on the first test having a highest line coverage ratio among the group of tests, wherein a second test is selected for the updated group of tests based on the second test having a highest function coverage ratio among the group of tests,
wherein a third test is selected for the updated group of tests based on the third test having a highest branch coverage ratio among the group of tests, and
wherein the first test, the second test, and the third test are selected independently of a combined coverage ratio of the first test, the second test, and the third test;
creating an updated computer-executable program from the file; and
testing the updated computer-executable program with the updated group of tests.