-
Notifications
You must be signed in to change notification settings - Fork 26
Design
Sandboni consists of a few parts:
- The SCM inspector that identifies changes between two SCM revisions or a revision and the "yet to be committed" code.
- The engine that builds a
Change Dependency Graph (CDG)
for the change set supplied by the Git inspector. - A series of plugins: Maven, Gradle, IntelliJ, Jules Global Library (JGL).
The Engine implements the first Sandboni design principle - Principle of Least Effort
- by applying the static
JVM byte code analysis without actually executing it. This is an exceptionally efficient way to
build a CDG
and detect change
-related tests.
Consequently, for a low penalty in time and compute resources, we can execute the Sandboni filter just-in-time and every
time we derive a change code coverage
. The stateless engine does not need
persistent stores, in-memory caches, and extensive synchronizations. This makes our task much easer and we can fully focus on the algorithm's complexities.
|---------------- |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| TestClassVisitor
| Links init/destroy methods annotated with standard JUnit annotations to the CDG
|
| SpringControllerClassVisitor
|Links methods and variables annotated with Spring annotations|
| JavaxControllerClassVisitor
|Links methods and variables annotated with Javax annotations|
| AffectedClassVisitor
|Simply delegates class changes to the method visitor|
| CallerClassVisitor
| Does most of the work: traverses a byte code and relates line numbers supplied in a git change set to the class methods. Builds links between the modified method and methods/fields the modified method relies on.|
| ImplementingClassVisitor
|Links methods in each interface inherited by a class|
Sandboni uses a static analysis of compiled JVM byte-code in order to build the CDG
Static analysis, also called static code analysis, is a method of examining the code without executing the program. It allows us to understand the code structure and its internal and external dependencies