TRX files and HTML reports (EnhancedTestReport, ReportGenerator coverage) are built from test runs that capture stdout. Integration tests using TestReportHelper emit JSON that includes:
- HTTP request URLs, query parameters, headers, and bodies
- HTTP response headers and bodies
- Assertion details
Those outputs can contain management tokens, API keys, stack API URLs, org identifiers, and other sensitive data. Treat every generated report as confidential.
The repository .gitignore is configured so that:
| Pattern | Purpose |
|---|---|
*.trx |
VSTest TRX may embed full StdOut from each test. |
**/TestResults/ |
Default location for TRX, Cobertura, and report HTML. |
**/EnhancedReport*.html |
Single-file enhanced reports (if written outside TestResults by mistake). |
**/Coverage-*/**/*.html |
ReportGenerator output trees. |
-
Write reports only under
TestResults
Scripts should pass--output/ targetdir under each test project’sTestResultsfolder so one ignore rule covers everything. -
CI only
Upload reports as artifacts (actions/upload-artifact) withif: success() || failure()for debugging—never commit them back to the branch. -
Never
git add -fon ignored report paths
If a file was tracked before it was ignored, remove it from the index:
git rm -r --cached path/to/TestResults -
Optional local hook
To block accidental commits, install a pre-commit hook that rejects staged paths underTestResults/or matchingEnhancedReport*.html. SeeScripts/pre-commit-no-test-artifacts.sample.
- EnhancedTestReport tool:
tools/EnhancedTestReport/– run afterdotnet testviaScripts/run-unit-test-case.shorScripts/run-test-case.sh. Output is always under**/TestResults/(ignored by git). - Test pipeline overview: see internal
TEST_REPORT_LOGIC.md(or your team’s copy) for TRX + Cobertura + EnhancedTestReport flow.