Automated test identification and implementation in a database environment
Abstract
A codebase system that maintains and utilizes a dynamic mapping between a collection of tests and files within a codebase to ensure error detection and code validity. The codebase system accesses a collection of tests configured to process files within the codebase to identify errors. It then generates a mapping by executing these tests to determine the specific files each test operates on. Upon detecting updates to the test collection, the codebase system updates this mapping by re-executing the updated tests, identifying the new set of files for each test, and aggregating these updates into the existing mapping. When changes to the files in the codebase are detected, the codebase system accesses the updated mapping to identify which tests relate to the altered files. The codebase system then executes this relevant subset of tests to validate the modifications made to the files.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 5 · Forward citations: 0.
Claims (20 — 3 Independent, 17 Dependent)
- Claim 1Independent Claim
A method comprising: accessing, by a codebase system, a set of tests each configured to, when executed, process one or more files within a codebase to detect a presence of errors within the one or more files; generating, by the codebase system, a mapping between each test of the set of tests and a corresponding set of files within the codebase by executing the set of tests and detecting, for each executed test, the set of files within the codebase on which the executed test operates; detecting, by the codebase system, an update to the set of tests; in response to detecting the update to the set of tests, updating, by the codebase system, the mapping by re-executing the updated set of tests, detecting an updated set of files corresponding to each test in the updated set of tests, and merging the mapping with the updated set of tests and the updated set of files corresponding to the updated set of tests; detecting, by the codebase system, an update to one or more files within the codebase; querying, by the codebase system, the updated mapping to identify a subset of tests from the set that are mapped to the updated one or more files; and re-executing, by the codebase system, the identified subset of tests to validate the updated one or more files.
- Claim 2Depends on #1
The method of claim 1, wherein detecting an update to one or more files within the codebase comprises: detecting a new code commit; and identifying one or more code files associated with the new code commit.
- Claim 3Depends on #1
The method of claim 1, further comprising storing the mapping in a graph data structure.
- Claim 4Depends on #1
The method of claim 1, further comprising storing the mapping in a tree data structure comprising a plurality of nodes, each corresponding to a test.
- Claim 5Depends on #4
The method of claim 4, further comprising re-executing each test in the set of tests in an order based on traversal of the tree data structure.
- Claim 6Depends on #4
The method of claim 4, wherein re-executing a subset of tests is in an order based on traversal of a subtree of the tree data structure.
- Claim 7Depends on #4
The method of claim 4, wherein re-executing a test comprises: determining whether re-executing the test is successful; responsive to determining that the re-executing of the test is successful, detecting a set of files within the codebase on which the executed test operates; recording an updated mapping between the re-executed test and the detected set of files in a data structure; and aggregating the updated mapping with a previously recorded mapping.
- Claim 8Depends on #7
The method of claim 7, wherein re-executing a test comprises: responsive to determining that re-executing of the test is not successful, accessing the tree data structure to identify a node corresponding to the test; identifying a subtree of the node; and causing one or more tests corresponding to one or more nodes in the subtree to be re-executed.
- Claim 9Independent Claim
A non-transitory computer-readable storage medium having instructions encoded thereon that, when executed by a processor, cause one or more processors to: access, by a codebase system, a set of tests each configured to, when executed, process one or more files within a codebase to detect a presence of errors within the one or more files; generate, by the codebase system, a mapping between each test of the set of tests and a corresponding set of files within the codebase by executing the set of tests and detecting, for each executed test, the set of files within the codebase on which the executed test operates; detect, by the codebase system, an update to the set of tests; in response to detecting the update to the set of tests, update, by the codebase system, the mapping by re-executing the updated set of tests, detecting an updated set of files corresponding to each test in the updated set of tests, and merging the mapping with the updated set of tests and the updated set of files corresponding to the updated set of tests; detect, by the codebase system, an update to one or more files within the codebase; query, by the codebase system, the updated mapping to identify a subset of tests from the set that are mapped to the updated one or more files; and re-execute, by the codebase system, the identified subset of tests to validate the updated one or more files.
- Claim 10Depends on #9
The non-transitory computer-readable storage medium of claim 9, wherein detecting an update to one or more files within the codebase comprises: detecting a new code commit; and identifying one or more code files associated with the new code commit.
- Claim 11Depends on #9
The non-transitory computer-readable storage medium of claim 9, wherein the instructions comprise instructions configured to cause the one or more processors to store the mapping in a graph data structure.
- Claim 12Depends on #9
The non-transitory computer-readable storage medium of claim 9, wherein the instructions comprise instructions configured to cause the one or more processors to store the mapping in a tree data structure.
- Claim 13Depends on #12
The non-transitory computer-readable storage medium of claim 12, wherein the instructions comprise instructions configured to re-execute each test in the set of tests in an order based on traversal of the tree data structure.
- Claim 14Depends on #12
The non-transitory computer-readable storage medium of claim 12, wherein re-executing a subset of tests is in an order based on traversal of a subtree of the tree data structure.
- Claim 15Depends on #12
The non-transitory computer-readable storage medium of claim 12, wherein re-executing a test comprises: determining whether re-executing the test is successful; responsive to determining that the re-executing of the test is successful, detecting a set of files within the codebase on which the executed test operates; recording an updated mapping between the re-executed test and the detected set of files in a data structure; and aggregating the updated mapping with a previously recorded mapping.
- Claim 16Depends on #15
The non-transitory computer-readable storage medium of claim 15, wherein re-executing a test comprises: responsive to determining that re-executing of the test is not successful, accessing the tree data structure to identify a node corresponding to the test; identifying a subtree of the node; and causing one or more tests corresponding to one or more nodes in the subtree to be re-executed.
- Claim 17Independent Claim
A computing system, comprising: one or more processors; and a non-transitory computer-readable storage medium having instructions encoded thereon that, when executed by a processor, cause the one or more processor to: access, by a codebase system, a set of tests each configured to, when executed, process one or more files within a codebase to detect a presence of errors within the one or more files; generate, by the codebase system, a mapping between each test of the set of tests and a corresponding set of files within the codebase by executing the set of tests and detecting, for each executed test, the set of files within the codebase on which the executed test operates; detect, by the codebase system, an update to the set of tests; in response to detecting the update to the set of tests, update, by the codebase system, the mapping by re-executing the updated set of tests, detecting an updated set of files corresponding to each test in the updated set of tests, and merging the mapping with the updated set of tests and the updated set of files corresponding to the updated set of tests; detect, by the codebase system, an update to one or more files within the codebase; query, by the codebase system, the updated mapping to identify a subset of tests from the set that are mapped to the updated one or more files; and re-execute, by the codebase system, the identified subset of tests to validate the updated one or more files.
- Claim 18Depends on #17
The computing system of claim 17, wherein detecting an update to one or more files within the codebase comprises: detecting a new code commit; and identifying one or more code files associated with the new code commit.
- Claim 19Depends on #17
The computing system of claim 17, wherein the instructions comprise instructions configured to cause the one or more processors to store the mapping in a tree data structure.
- Claim 20Depends on #19
The computing system of claim 19, wherein the instructions comprise instructions configured to re-execute each test in the set of tests in an order based on traversal of the tree data structure.
Technical Overview & Description
BACKGROUND This disclosure relates generally to codebase systems and, more specifically, to optimizing test execution in codebase systems. A codebase refers to a collection of code used to build an application or project. It encompasses source code, libraries, dependencies, test code, and documentation, among other components. For instance, the application or project might be designed to manage a centralized database system, such as employment management database systems, that stores large amounts of data for the various entities associated with these systems. As the application evolves, it may undergo enhancements and modifications. These modifications often require a suite of tests to ensure that the software continues to meet its intended requirements and functions correctly. These tests are crucial for identifying bugs or flaws that could negatively impact the user experience, reliability, and overall performance of the software. For example, certain tests ensure that any changes do not adversely affect the software's other components, thus maintaining the integrity of the codebase over time. Other tests identify bottlenecks and areas that may not perform well under heavy loads, allowing developers to address these issues proactively. Accordingly, codebase testing is a critical phase in the software development lifecycle, aimed at ensuring that the application meets its specifications, is free of defects, and delivers a quality experience to the end-user. However, this process can be time-consuming and resource-intensive. Large and complex codebases require extensive testing to cover all possible use cases, interactions between components, and edge cases. The greater the complexity and size, the more tests are needed, increasing the time and resources required to ensure comprehensive coverage. SUMMARY Embodiments described herein include a codebase system that maintains and utilizes a dynamic mapping between a collection of tests and files within a codebase to e
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (5)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (5)
- Gu et al, CN 105117335 (translation), Nov. 10, 2017, 4 pgs
- <
- CN_105117335.pdf
- >
- .