How to Set up Test Selection
Teamscale offers four test selection techniques that reduce the number of tests you run. If you are not yet familiar with them, read the overview of the test selection techniques first. This guide shows you where to start for each technique.
Similarity Scoring
Similarity Scoring selects the tests for a code change and only needs your test code. Start here if you want change-based test selection.
Learn how to set up Similarity Scoring.
AI Test Clustering
AI Test Clustering builds a smoke test suite and only needs your test code and an AI model provider. Start here if you want a smoke test suite.
Learn how to set up AI Test Clustering.
Test Impact Analysis and Pareto Optimization
Test Impact Analysis and Pareto Optimization need testwise coverage. You record it once for both techniques.
The Test Suggestions perspective shows the results of both techniques. The reference describes the Tests Covering Risks tab for TIA and the Coverage-Based Suggestions tab for Pareto Optimization.
- Learn how to provide testwise coverage for your programming language and build tool.
- For Java projects with Gradle, follow the Test Impact Analysis tutorial for a step-by-step example.
Running the Selected Tests
Once Teamscale suggests tests, you can run them in several ways:
- The Test Suggestions perspective shows the suggested tests for all four techniques, for example, to plan manual test runs.
- The Gradle plugin and the Maven plugin run only the impacted tests in your build.
- The
teamscale-dev fetch-impacted-testscommand prints the impacted tests of the last commit, for example, for a custom CI script. - The Claude Code plugin lets an AI coding agent run only the tests that its changes impact.
