C# / .NET
Test Suite Monitoring for .NET (dotnet test)
Monitor your .NET test suite health with TestGlance
Get Started in 3 Steps
- 1Install the JUnit XML logger NuGet package: `dotnet add package JunitXml.TestLogger`
- 2Run tests with JUnit output: `dotnet test --logger "junit;LogFilePath=test-results/dotnet.xml"`
- 3Add the TestGlance GitHub Action to your CI workflow
GitHub Actions Workflow
# .github/workflows/test.yml
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Run tests
run: dotnet test --logger "junit;LogFilePath=test-results/dotnet.xml"
- name: Report to TestGlance
if: always()
uses: testglance/action@v1
with:
api-key: ${{ secrets.TESTGLANCE_API_KEY }}
report-path: test-results/dotnet.xmlWhat You Get
- ✓Flaky test detection — automatically identify tests that pass and fail intermittently
- ✓Duration trends — track which tests are getting slower over time
- ✓Health score — a single metric summarizing your test suite reliability
- ✓CI summary — rich test result summaries directly in your GitHub Actions runs
FAQ
How do I generate JUnit XML from dotnet test?
Install the JunitXml.TestLogger NuGet package, then run `dotnet test --logger "junit;LogFilePath=test-results/dotnet.xml"`. The package supports both xUnit, NUnit, and MSTest.
Does TestGlance work with NUnit and MSTest?
Yes. The JunitXml.TestLogger works with all .NET test frameworks — xUnit, NUnit, and MSTest. TestGlance processes the resulting JUnit XML identically.
Can I monitor .NET test results across multiple projects?
Yes. When running `dotnet test` on a solution, configure each project to output to a separate file or use a shared directory with a glob pattern in the TestGlance action.
Start Monitoring Your .NET (dotnet test) Tests
Free to get started. Set up in under 5 minutes.
Get Started