---
url: /howto/setting-up-test-selection.md
---

# 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](../../introduction/test-selection/) first.
This guide shows you where to start for each technique.

\[\[toc]]

## Similarity Scoring

[Similarity Scoring](../../introduction/test-selection/#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](../setting-up-similarity-scoring/).

## AI Test Clustering

[AI Test Clustering](../../introduction/test-selection/#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](../ai-test-clustering/).

## Test Impact Analysis and Pareto Optimization

[Test Impact Analysis](../../introduction/test-selection/#test-impact-analysis) and [Pareto Optimization](../../introduction/test-selection/#pareto-optimization) need [testwise coverage](../../glossary/#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](../../reference/ui/test-suggestions/#results-tests-covering-risks-test-impact-analysis) for TIA and the [*Coverage-Based Suggestions* tab](../../reference/ui/test-suggestions/#results-coverage-based-suggestions-pareto-optimization) for Pareto Optimization.

* Learn [how to provide testwise coverage](../providing-testwise-coverage/) for your programming language and build tool.
* For Java projects with Gradle, follow the [Test Impact Analysis tutorial](../../tutorial/tia-java/) 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](../../reference/ui/test-suggestions/) shows the suggested tests for all four techniques, for example, to plan manual test runs.
* The [Gradle plugin](../../reference/integrations/gradle-plugin/) and the [Maven plugin](../../reference/integrations/maven-plugin/) run only the impacted tests in your build.
* The [`teamscale-dev fetch-impacted-tests` command](../../reference/cli/teamscale-dev/#the-fetch-impacted-tests-command) prints the impacted tests of the last commit, for example, for a custom CI script.
* The [Claude Code plugin](../integrating-with-claude-code/) lets an AI coding agent run only the tests that its changes impact.
