Merged
Conversation
…all TRX test results.
There was a problem hiding this comment.
Pull Request Overview
This PR changes the test duration property from a double (seconds) to a TimeSpan type and adds comprehensive support for all TRX test outcome types. The changes include refactoring the TestOutcome enum to include all standard TRX outcomes with extension methods for classification, and adding thorough test coverage with real TRX file examples.
- Changes test duration from
doubletoTimeSpanfor better type safety and clarity - Expands TestOutcome enum to support all TRX outcome types with helper extension methods
- Adds comprehensive test coverage using real TRX example files
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/DemaConsulting.TestResults/TestResult.cs | Changes Duration property from double to TimeSpan and default outcome from Skipped to NotExecuted |
| src/DemaConsulting.TestResults/TestOutcome.cs | Expands enum with all TRX outcomes and adds extension methods for outcome classification |
| src/DemaConsulting.TestResults/IO/TrxSerializer.cs | Updates serialization/deserialization to handle TimeSpan duration and improved error handling |
| test/DemaConsulting.TestResults.Tests/TestOutcomeTests.cs | New test file for comprehensive testing of TestOutcome extension methods |
| test/DemaConsulting.TestResults.Tests/IO/TrxExampleTests.cs | New test file validating deserialization against real TRX files |
| test/DemaConsulting.TestResults.Tests/IO/TrxSerializerTests.cs | Updates existing tests to use TimeSpan for duration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
New tests have been added which deserialize standard TRX test files and confirm the contents.