US 12,436,867 B2
Machine learning based pre-submit test selection
Jingun Hong, Seoul (KR); and Dong Won Hwang, Seoul (KR)
Assigned to SAP SE, Walldorf (DE)
Filed by SAP SE, Walldorf (DE)
Filed on Sep. 5, 2023, as Appl. No. 18/461,097.
Prior Publication US 2025/0077386 A1, Mar. 6, 2025
Int. Cl. G06F 9/44 (2018.01); G06F 11/3604 (2025.01); G06N 20/00 (2019.01)
CPC G06F 11/3608 (2013.01) [G06N 20/00 (2019.01)] 20 Claims
OG exemplary drawing
 
1. A computer system, comprising:
one or more processors; and
one or more machine-readable medium coupled to the one or more processors and storing computer program code comprising sets of instructions executable by the one or more processors to:
obtain a commit including a new code change that that is different compared to submitted source code stored in a source code repository;
generate a feature vector based on the new code change and historical test case information, the historical test case information including information on code submissions rejected for submission to the source code repository based on pre-submit tests and information on bug-inducing code changes based on post-submit tests, the feature vector providing labeled data for the bug-inducing code changes;
determine a ranking of a plurality of pre-submit tests using a learning algorithm by providing the feature vector to the learning algorithm;
select one or more of the plurality of pre-submit tests based on the ranking to determine a set of selected pre-submit tests;
test the new code change using the set of selected pre-submit tests to obtain pre-submit test results;
determine an assessment of the new code change based on the pre-submit test results, the assessment indicating whether the new code change is accepted or rejected for submission to the source code repository;
test new submitted source code submitted to the source code repository and merged with other source code stored in the source code repository using a set of post-submit tests to obtain post-submit test results, the new submitted source code including the new code change; and
update the learning algorithm based on the assessment of the new code change and the post-submit test results to obtain an updated learning algorithm.