IP Library › Granted Patent US 12,282,417
Granted Patent B2
US 12,282,417 · App. 18/336,757 · Granted Apr 22, 2025

Retrying failed test cases in software testing using parallel threads

Inventors: Shaktiraj Chauhan (Normal, IL); Nate Shepherd (Bloomington, IL)
Assignee: State Farm Mutual Automobile Insurance Company
G06F11/3688G06F11/3692G06F11/3696G06N20/00
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,282,417
App. No.
18/336,757
Filed
Jun 16, 2023
Granted
Apr 22, 2025
Kind
B2
Art Unit
2191
USPC
717/124
Abstract

Test cases written to test a software application can be dynamically distributed among different sets of test cases that can be executed simultaneously in different parallel threads, thereby speeding up testing relative to executing the test cases sequentially in a single thread. Although executing the test cases in parallel threads can cause the test cases to execute in a different order than intended by developers, any test cases that fail due to database conflicts or other errors as a result of the parallelization can be retried at least once. Re-executing failed test cases at a later time can lead to the full set of test cases ultimately succeeding, despite errors that may have been caused by the parallelization.

Claims (98)

1. A computer-implemented method, comprising:

distributing, by one or more processors, a group of test cases among different test sets, wherein the group of test cases is configured to test interactions between a software application and a database;

executing, by the one or more processors, the different test sets in parallel;

identifying, by the one or more processors, a set of failed test cases comprising test cases that:

were executed during execution of the different test sets in parallel, and

produced test results indicating that the software application failed to pass the test cases;

determining, by the one or more processors, causes of failures of the test cases in the set of failed test cases;

identifying, by the one or more processors, failure codes that correspond to the causes of the failures of the test cases in the set of failed test cases;

determining, by the one or more processors, and based on the failure codes, an execution order for re-execution of the test cases in the set of failed test cases; and

re-executing, by the one or more processors, the test cases in the set of failed test cases based on the execution order.

2. The computer-implemented method of claim 1 , wherein:

executing the different test sets in parallel is associated with a first likelihood of the causes of the failures, and

re-executing the test cases in the set of failed test cases based on the execution order is associated with a second likelihood, less than the first likelihood, of the causes of the failures reoccurring during re-execution of the test cases in the set of failed test cases.

3. The computer-implemented method of claim 1 , wherein:

the execution order is determined based at least in part by a machine learning model, and

the machine learning model is trained, based on historical data indicating successful re-executions of historical failed test cases associated with the failure codes, to determine an arrangement of the execution order that is predicted to reduce likelihoods of the causes of the failures reoccurring during re-execution of the test cases in the set of failed test cases.

4. The computer-implemented method of claim 1 , wherein:

the set of failed test cases comprises:

one or more first test cases associated with a first failure code of the failure codes, and

one or more second test cases associated with a second failure code of the failure codes, and

the execution order causes the one or more processors to:

re-execute the one or more first test cases substantially immediately following failure of the one or more first test cases, based on the first failure code, and

re-execute the one or more second test cases after a period of time following failure of the one or more second test cases, based on the second failure code.

5. The computer-implemented method of claim 4 , wherein:

the first failure code indicates that database locking errors caused the one or more first test cases to fail, and

the execution order is arranged, based on the first failure code, to cause re-execution of the one or more first test cases substantially immediately following the failure of the one or more first test cases.

6. The computer-implemented method of claim 4 , wherein:

the second failure code indicates that missing data errors caused the one or more second test cases to fail, and

the execution order is arranged, based on the second failure code, to delay re-execution of the one or more second test cases for the period of time, following the failure of the one or more second test cases, to reduce likelihoods of the missing data errors re-occurring during re-execution of the one or more second test cases.

7. The computer-implemented method of claim 1 , wherein re-executing the test cases in the set of failed test cases based on the execution order comprises:

distributing, by the one or more processors, the test cases in the set of failed test cases among different retry test sets; and

executing, by the one or more processors, the different retry test sets in parallel.

8. The computer-implemented method of claim 7 , wherein determining the execution order comprises determining different execution orders associated with the different retry test sets.

9. The computer-implemented method of claim 1 , wherein:

the group of test cases was created based on an expectation of individual test cases, of the group of test cases, being executed in a sequential execution order, and

the failures of one or more of the test cases, in the set of failed test cases, are caused at least in part by executing the different test sets in parallel, rather than executing the individual test cases in the sequential execution order.

10. The computer-implemented method of claim 1 , further comprising:

collecting, by the one or more processors, final test results associated with the group of test cases, wherein the final test results indicate whether individual test cases succeeded during at least one of:

execution of the different test sets in parallel, or

re-execution of the set of failed test cases; and

combining, by the one or more processors, the final test results into an aggregated test result report.

11. A computing device, comprising:

one or more processors; and

memory storing computer-executable instructions that, when executed by the one or more processors, cause the one or more processors to perform operations comprising:

distributing a group of test cases, configured to test interactions between a software application and a database, among at least a first test set and a second test set;

executing the first test set and the second test set in parallel;

identifying a set of failed test cases comprising test cases that:

were executed during execution of the first test set and the second test set in parallel, and

produced test results indicating that the software application failed to pass the test cases;

determining causes of failures of the test cases in the set of failed test cases;

identifying failure codes that correspond to the causes of the failures of the test cases in the set of failed test cases;

determining, based on the failure codes, an execution order for re-execution of the test cases in the set of failed test cases; and

re-executing the test cases in the set of failed test cases based on the execution order.

12. The computing device of claim 11 , wherein the execution order is determined to reduce likelihoods of the causes of the failures, associated with the failure codes, reoccurring during the re-execution of the test cases in the set of failed test cases.

13. The computing device of claim 11 , wherein:

the set of failed test cases comprises:

one or more first test cases associated with a first failure code of the failure codes, and

one or more second test cases associated with a second failure code of the failure codes, and

the execution order causes the one or more processors to:

re-execute the one or more first test cases substantially immediately following failure of the one or more first test cases, based on the first failure code, and

re-execute the one or more second test cases after a period of time following failure of the one or more second test cases, based on the second failure code.

14. The computing device of claim 11 , wherein re-executing the test cases in the set of failed test cases based on the execution order comprises:

distributing the test cases, in the set of failed test cases, among different retry test sets; and

executing the different retry test sets in parallel.

15. The computing device of claim 11 , wherein:

the group of test cases was created based on an expectation of individual test cases, of the group of test cases, being executed in a sequential execution order, and

the failures of one or more of the test cases, in the set of failed test cases, are caused at least in part by executing the first test set and the second test set in parallel, rather than executing the individual test cases in the sequential execution order.

16. One or more non-transitory computer-readable media storing computer-executable instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising:

distributing a group of test cases, configured to test interactions between a software application and a database, among different test sets;

executing the different test sets in parallel;

identifying a set of failed test cases comprising test cases that:

were executed during execution of the different test sets in parallel, and

produced test results indicating that the software application failed to pass the test cases;

determining causes of failures of the test cases in the set of failed test cases;

identifying failure codes that correspond to the causes of the failures of the test cases in the set of failed test cases;

determining, based on the failure codes, an execution order for re-execution of the test cases in the set of failed test cases; and

re-executing the test cases in the set of failed test cases based on the execution order.

17. The one or more non-transitory computer-readable media of claim 16 , wherein the execution order is determined to reduce likelihoods of the causes of the failures, associated with the failure codes, reoccurring during the re-execution of the test cases in the set of failed test cases.

18. The one or more non-transitory computer-readable media of claim 16 , wherein:

the set of failed test cases comprises:

one or more first test cases associated with a first failure code of the failure codes, and

one or more second test cases associated with a second failure code of the failure codes, and

the execution order causes the one or more processors to:

re-execute the one or more first test cases substantially immediately following failure of the one or more first test cases, based on the first failure code, and

re-execute the one or more second test cases after a period of time following failure of the one or more second test cases, based on the second failure code.

19. The one or more non-transitory computer-readable media of claim 16 , wherein re-executing the test cases in the set of failed test cases based on the execution order comprises:

distributing the test cases in the set of failed test cases among different retry test sets; and

executing the different retry test sets in parallel.

20. A system comprising:

means for distributing a group of test cases, configured to test interactions between a software application and a database, among different test sets;

means for executing the different test sets in parallel;

means for identifying a set of failed test cases comprising test cases that:

were executed during execution of the different test sets in parallel, and

produced test results indicating that the software application failed to pass the test cases;

means for determining causes of failures of the test cases in the set of failed test cases;

means for identifying failure codes that correspond to the causes of the failures of the test cases in the set of failed test cases;

means for determining, based on the failure codes, an execution order for re-execution of the test cases in the set of failed test cases; and

means for re-executing the test cases in the set of failed test cases based on the execution order.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 16, 2023
From: CHAUHAN, SHAKTIRAJ; SHEPHERD, NATE
To: STATE FARM MUTUAL AUTOMOBILE INSURANCE COMPANY
Reel/Frame 063979/0052 →
Continuity (3)
Continuation 17333637 · May 28, 2021
Provisional Application 63152754 · Feb 23, 2021
Related Publication 20230333973A1 · Oct 19, 2023
References Cited (80)
US 6330528B1 · Huang et al. · 2001 [cited by applicant]
US 7178063B1 · Smith · 2007 [cited by applicant]
US 7506312B1 · Girolami-Rose · 2009 [cited by examiner]
US 8028276B1 · Bessonov · 2011 [cited by applicant]
US 8281187B1 · Desai et al. · 2012 [cited by applicant]
US 8549522B1 · Chatterjee et al. · 2013 [cited by applicant]
US 8639983B1 · Desai et al. · 2014 [cited by applicant]
US 9009823B1 · Ismael et al. · 2015 [cited by applicant]
US 9032373B1 · Gupta et al. · 2015 [cited by applicant]
US 10067858B2 · McDonald · 2018 [cited by applicant]
US 10387295B1 · Kesarwani · 2019 [cited by applicant]
US 10430319B1 · Tokappa et al. · 2019 [cited by applicant]
US 10628394B1 · Gurspan · 2020 [cited by applicant]
US 11080171B2 · Venkataraman et al. · 2021 [cited by applicant]
US 11537575B1 · McNair et al. · 2022 [cited by applicant]
US 11537616B1 · Lin · 2022 [cited by applicant]
US 20020116507A1 · Manjure et al. · 2002 [cited by applicant]
US 20030208351A1 · Hartman et al. · 2003 [cited by applicant]
US 20050120276A1 · Kolawa · 2005 [cited by applicant]
US 20050251719A1 · Gerber · 2005 [cited by applicant]
US 20060212412A1 · Sapir · 2006 [cited by applicant]
US 20070226691A1 · Happell et al. · 2007 [cited by applicant]
US 20070271483A1 · Kolawa et al. · 2007 [cited by applicant]
US 20090144706A1 · Pastorelli · 2009 [cited by applicant]
US 20090187366A1 · Day et al. · 2009 [cited by applicant]
US 20090259699A1 · Chasman et al. · 2009 [cited by applicant]
US 20090307763A1 · Rawlins · 2009 [cited by examiner]
US 20100100871A1 · Celeskey · 2010 [cited by applicant]
US 20110246540A1 · Salman et al. · 2011 [cited by applicant]
US 20120023373A1 · Chen · 2012 [cited by applicant]
US 20120151455A1 · Tsantilis et al. · 2012 [cited by applicant]
US 20130047141A1 · Shann · 2013 [cited by examiner]
US 20140359581A1 · Soshin · 2014 [cited by applicant]
US 20160026562A1 · Hwang et al. · 2016 [cited by applicant]
US 20160041543A1 · Monczynski et al. · 2016 [cited by applicant]
US 20160162392A1 · Hu · 2016 [cited by examiner]
US 20160246575A1 · Baluch et al. · 2016 [cited by applicant]
US 20170109257A1 · Li · 2017 [cited by examiner]
US 20180113798A1 · Johnston et al. · 2018 [cited by applicant]
US 20180113799A1 · M.V. et al. · 2018 [cited by applicant]
US 20180121339A1 · Mayers et al. · 2018 [cited by applicant]
US 20180173606A1 · Malla et al. · 2018 [cited by applicant]
US 20190087311A1 · Donaldson · 2019 [cited by examiner]
US 20190129833A1 · Lv et al. · 2019 [cited by applicant]
US 20190294531A1 · Avisror · 2019 [cited by examiner]
US 20190332523A1 · Gefen · 2019 [cited by examiner]
US 20200065235A1 · Li · 2020 [cited by applicant]
US 20200125485A1 · Wiener et al. · 2020 [cited by applicant]
US 20200174907A1 · Lundquist et al. · 2020 [cited by applicant]
US 20200210170A1 · Johnson · 2020 [cited by applicant]
US 20200310860A1 · Arumugam et al. · 2020 [cited by applicant]
US 20200349062A1 · Coleman · 2020 [cited by examiner]
US 20210109848A1 · Leon · 2021 [cited by applicant]
US 20210174228A1 · Gokarn et al. · 2021 [cited by applicant]
US 20210286710A1 · Hicks et al. · 2021 [cited by applicant]
US 20210288925A1 · Tagra · 2021 [cited by applicant]
US 20230090033A1 · Chauhan · 2023 [cited by applicant]
US 20230333972A1 · Shaktiraj · 2023 [cited by applicant]
US 20230333973A1 · Shaktiraj · 2023 [cited by applicant]
Office Action for U.S. Appl. No. 17/333,894, mailed on Nov. 27, 2023, Shaktiraj Chauhan, “Parallel Software Testing Based on Annotations”, 21 pages. [cited by applicant]
Shrivathsan, et al., “Novel Fuzzy Clustering Methods for Test Case Prioritization in Software Projects.” Symmetry, vol. 11, No. 1400, 2019, 22 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,894, mailed on Aug. 1, 2023, Shaktiraj Chauhan, “Parallel Software Testing Based on Annotations”, 19 pages. [cited by applicant]
Rauf, et al., “Ontology Driven Semantic Annotation Based GUI Testing”, 2010 6th International Conference on Emerging Technologies, IEEE, 2010, pp. 261-264. [cited by applicant]
DisGiuseppe, “Automatically Describing Software Faults”. Proceedings of the 2013 9th Joint Metting on the Foundations of Software Engineering, 2013, 4 pgs. [cited by applicant]
Haftmann, et al., “Parellel Execution of Test Runs for Database Application Systems” Proceedings of the 31st VLDB Conference, 2005, 12 pgs. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,739, mailed on Jan. 12, 2023, Chauhan, “Software Testing in Parallel With Different Database Instances”, 12 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,894, mailed on Jan. 6, 2023, Chauhan, “Parallel Software Testing Based on Annotations”, 18 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,989, mailed on Nov. 18, 2022, Chauhan, “Test Conflict Guard for Parallel Software Testing”, 33 Pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,637, mailed on Dec. 20, 2022, Chauhan, “Retrying Failed Test Cases in Software Testing Using Parallel Threads”, 22 Pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,989, mailed on Apr. 4, 2023, Chauhan, “Test Conflict Guard for Parallel Software Testing”, 37 Pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,637, mailed on Jun. 15, 2022, Chauhan “Retrying Failed Test Cases in Software Testing Using Parallel Threads”, 18 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,535, mailed on Jun. 20, 2022, Chauhan, “Software Testing in Parallel Threads With a Record-Locking Database”, 6 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,739, mailed Aug. 4, 2022, Chauhan, “Software Testing in Parallel With Different Database Instances”, 12 pages. [cited by applicant]
Qusef, “Recovering test-to-code traceability using slicing and textual analysis”, Journal of Systems and Software 88 2014, pp. 147-168. [cited by applicant]
Office Action for U.S. Appl. No. 18/070,120, mailed on Jun. 16, 2023, Chauhan, “Software Testing in Parallel Threads With a Record-Locking Database”, 7 Pages. [cited by applicant]
Willemsen, “Improving diagnosis by Grouping Test Cases to Reduce Complexity”, MS thesis, University of Twente,2018, 93 pgs. [cited by applicant]
Office Action for U.S. Appl. No. 18/482,772, mailed on May 22, 2024, Chauhan, “Test Conflict Guard for Parallel Software Testing”, 30 pages. [cited by applicant]
Office Action for U.S. Appl. No. 18/334,786, Dated Jul. 16, 2024, 6 pages. [cited by applicant]
Office Action for U.S. Appl. No. 17/333,894, Dated Jul. 26, 2024, 20 pages. [cited by applicant]
Office Action for U.S. Appl. No. 18/482,772, dated Sep. 10, 2024, 32 pages. [cited by applicant]
Cited By (1)
US 12,743,355