Skip to content

Change test duration to TimeSpan - #6

Merged
Malcolmnixon merged 4 commits into
mainfrom
duration-timespan
Jul 20, 2025
Merged

Malcolmnixon merged 4 commits into
mainfrom
duration-timespan

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This PR:

  • changes the test duration to a TimeSpan
  • adds support for all TRX outcome types

New tests have been added which deserialize standard TRX test files and confirm the contents.

@Malcolmnixon
Malcolmnixon requested a review from Copilot July 20, 2025 02:00

This comment was marked as outdated.

@Malcolmnixon
Malcolmnixon requested a review from Copilot July 20, 2025 02:04

This comment was marked as outdated.

@Malcolmnixon
Malcolmnixon requested a review from Copilot July 20, 2025 02:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 double to TimeSpan for 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

Comment thread src/DemaConsulting.TestResults/IO/TrxSerializer.cs
Comment thread DemaConsulting.TestResults.sln.DotSettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants