Appearance
TrxReader Class
Definition
Provides utilities for parsing Visual Studio test result (.trx) files and optional coverage reports into a unified TestRunSummary.
- Namespace:
JASE.TestAnalysis - Assembly:
JASE.TestAnalysis.dll
Methods
| Name | Description |
|---|---|
TestRunSummary Read(Stream stream, Stream coverageSource = null) | Reads Visual Studio TRX test results from a stream and constructs a TestRunSummary containing test outcomes, duration totals, per-test metadata, and optional coverage information. |
TestRunSummary Read(byte[] source, byte[] coverage = null) | Reads a Visual Studio TRX test results document from a byte array containing XML content, with optional coverage loaded from a second byte array. |
TestRunSummary ReadFile(string path, string coveragePath = null) | Reads a Visual Studio TRX test results document from a file on disk, with optional coverage loaded from a second file. |
TestRunSummary ReadXml(string xml) | Reads a Visual Studio TRX test results document from a string containing XML content. |
Remarks
This reader supports the Visual Studio Team Test schema (http://microsoft.com/schemas/VisualStudio/TeamTest/2010) and extracts:
Test case names and fully-qualified class namesExecution IDs and test IDsOutcome values such as Passed, Failed, and SkippedExecution duration values converted to millisecondsError messages and stack traces for failed tests When a coverage report is provided, the reader detects whether it is Cobertura or OpenCover format and converts it into a unified coverage model.