To use Test Analytics with your .NET projects use the
test-collector-dotnet package with xUnit.
Before you start, make sure .NET runs with access to CI environment variables.
Create a test suite and copy the API token that it gives you.
Buildkite.TestAnalytics.Xunitto your list of dependencies in your xUnit test project:
$ dotnet add package Buildkite.TestAnalytics.Xunit
Set up your API token
BUILDKITE_ANALYTICS_TOKENenvironment variable to your build system's environment.
Run your tests
Run your tests like normal. Note that we attempt to detect the presence of several common CI environments, however if this fails you can set the
CIenvironment variable to any value and it will work.
$ dotnet test Buildkite.TestAnalytics.Tests
Verify that it works
If all is well, you should see the test run in the test analytics section of the Buildkite dashboard.