---
url: /reference/supported-technologies/test-frameworks.md
---
# Test Frameworks

Teamscale can process a range of test-related data sources.
Some tests can directly be detected in the source code.
Reports from [test execution](../../../glossary/#test-execution)s can be uploaded in various formats.
With [Testwise Coverage](../../../glossary/#testwise-coverage) there is even a way to upload test coverage on a per-test granularity.

## Test Implementations

If your test framework is supported the *Tests* page in the [*Metrics* perspective](../../ui/metrics/) shows the hierarchy of tests and their overall count.

Tests implemented with the following frameworks can be automatically detected from the source code:

* [Boost.Test][boost-test]
* [Google Test][gtest]
* [pytest][pytest]
* [unittest][unittest]
* [JUnit][junit]
* [NUnit][nunit] versions 2 and 3 for C#
* [MathWorks Testing frameworks][mathworkstest] Function-Based and Class-Based Unit Tests
* [MSTest][mstest] for C#
* [XCTest][xctest] for Swift and Objective-C

### Generic File-Based Test Implementations

If your test framework is not (yet) supported and its tests cannot be detected from the source code automatically, you can use include/exclude patterns to identify these files so they can be indexed to provide [Test Suggestions](../../ui/test-suggestions/).

Configure a list of [Glob patterns](../../../glossary/#glob-pattern) in the `"Generic test implementation patterns"` [analysis profile option](../../../howto/editing-an-analysis-profile/#editing-general-options-of-the-analysis-profile).
Every file whose path matches one of the patterns is defined as a single test implementation: the file path becomes the test's name and the whole file content becomes its implementation body.

To configure the import, add one pattern per test file type, for example:

```
**/*.robot
**/*.feature
```

Keep the following constraints in mind:

* The option selects files, so the tests will be the content of the whole file. If your files contain multiple tests, they will be considered as one big test.
* Matching files must be part of the analyzed code.
  Files excluded from the project or detected as binary never reach the analysis and cannot be imported.

The defined tests appear on the *Tests* page in the [*Metrics* perspective](../../ui/metrics/) like any other test implementation.

## Test Execution Formats

If test execution reports are provided the *Tests* page in the [*Metrics* perspective](../../ui/metrics/) shows the hierarchy of tests, their durations, results and overall count.

The following test execution formats are currently supported by Teamscale:

* [Boost.Test][boost-test]
* [JUnit][junit-report]
* [XUnit][xunit]
* [MsTest][mstest]
* [NUnit][nunit] versions 2 and 3 for C#
* [Testwise Coverage][testwise]

:::tip Additional Frameworks & Formats
If your framework isn't supported yet, don't hesitate to [contact us](mailto:support@teamscale.com); we continuously add support for new formats.
:::

### Configuring Jest to Output A Supported Report

To get a test execution report from [Jest](https://jestjs.io/) that Teamscale can parse (JUnit format), you need to install the [jest-junit plugin](https://www.npmjs.com/package/jest-junit) and then configure it to also emit file names in the report:

```js
"jest-junit": {
  // ...
  "addFileAttribute": "true"
}
```

[gtest]: https://github.com/google/googletest/

[unittest]: https://docs.python.org/3/library/unittest.html

[pytest]: https://docs.pytest.org/

[junit]: https://junit.org/junit5/

[junit-report]: https://github.com/junit-team/junit5/blob/r5.7.1/platform-tests/src/test/resources/jenkins-junit.xsd

[xunit]: https://xunit.net/docs/format-xml-v2

[mstest]: https://docs.microsoft.com/de-de/dotnet/core/testing/unit-testing-with-mstest

[testwise]: ../../upload-formats-and-samples/testwise-coverage/

[nunit]: https://nunit.org/

[mathworkstest]: https://mathworks.com/help/matlab/matlab-unit-test-framework.html

[mstest]: https://github.com/microsoft/testfx

[xctest]: https://developer.apple.com/documentation/xctest

[boost-test]: https://www.boost.org/doc/libs/1_83_0/libs/test/doc/html/index.html
