Skip to content

Conversation

@bryanbcook
Copy link
Contributor

@bryanbcook bryanbcook commented Nov 22, 2025

This PR introduces startTime + endTime timestamps to individual TestCase results, which is similar to #16. Having timestamps at this level allows analysis to establish the sequence of test execution.

Based on research, only MSTest, NUnit and TestNg have direct support in their schema for this. Other implementations will have an undefined value for startTime + endTime.

As this introduced new properties to the model objects, all brittle tests were impacted. Related to #93, I reworked the xunit, mstest, nunit and testng tests to use explicit assertions for their specific test concerns; roughly 16 of the 40 impacted tests were addressed. Reducing this friction will make introducing #85 easier, and address issue #93

Related to nunit_v3.xml, which was originally sourced from https://nunit.org/files/testresult_30.txt, I noticed timestamps were missing so I recreated the output using nunit3-console.exe. There were significant differences from the sample:

difference original (sample) v3 (actual) decision / impact
an invalid or bad fixture xml does not include tests xml includes tests, so number of total and skipped tests is higher include skipped tests in result, which increases the total number of tests
tests and suites with a label set to "Invalid" Treated as Skipped Treated as Error Logic added to treat Invalid as Skipped
_AppDomain is different test-domain-mock-assembly.dll nunit-agent use nunit-agent

original obtained from: https://nunit.org/files/testresult_30.txt
Differences
- Test Cases marked as "Invalid" are represented in the sample as Failed instead of Skipped.
- Test Suites marked as "Invalid" are represented in the sample as Failed instead of Skipped.
- Ignored and BadFixtures in the sample do not have test-case elements though the suite reports total test case values greater than zero. The nunit3-console includes the test-case elements so the number of total tests and ignored tests is higher.
@bryanbcook
Copy link
Contributor Author

@ASaiAnudeep thoughts?

@bryanbcook bryanbcook changed the title Add started+completed timestamps to test case results Add startTime+endTime timestamps to test case results Nov 26, 2025
@bryanbcook
Copy link
Contributor Author

Good to merge? I have a few additional PRs to merge based on these commits.

@bryanbcook bryanbcook changed the title Add startTime+endTime timestamps to test case results feat: Add startTime+endTime timestamps to test case results Nov 27, 2025
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