Test Brain uses a machine learning model to determine the risk of a commit containing a defect.
To build a model of the factors contributing to code defects, TestBrain’s machine learning reviews the code development and test history:
- When you first install TestBrain, it connects to your repository and builds an initial defect model using the git blame feature to find bugs and bug fixes over the entire code development history.
- If using the optional Jira integration, TestBrain refines this model by importing the database of defects and the commits that caused them.
- If TestBrain is integrated with your automated testing via the CI/CD, it will continue to learn and refine its risk model from on-going test results.
- If you manually import results of manual or automated testing, it will learn from this data, too.
TestBrain does not read the code itself, making it independent of the programming language and code structure. Instead, it looks for patterns in the commits which led to defects in the past and uses these patterns to determine the risk profile of new commits. It builds a model based on process factors that have been shown to affect the likelihood of a defect. The model uses approximately 30 factors including:
- commit details: size of commit, number of files changed, number of files and areas affected
- area of code changed: some areas of the code area more defect prone than others, or may be stale code
- purpose of commit: whether the commit is adding new code, updating legacy code, or fixing a bug
- developer habits: whether the code was submitted at unusual times or before a deadline; how much experience the developer has with this area of the code
- other activity: how many other developers are working on the same code area
For more technical detail, please review the TestBrain risk model white paper at: