Fix Visual Test Runner so that it will split up tests that use class based test cases
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
Description
If you use a class for the TestCase the Visual Runner will just collapse those into a single test.

Tests using primitives for data all get split into different test cases

If you check the TheoryDiscoverer you'll see that it only generates the one test case. We'll need to look into the xUnit source code to see what logic it uses to split up test cases and why it doesn't do it for class based TestData.
Currently in our test runner if you have a test case that falls into this category we will just display the last failed result otherwise you only see the result of the last test executed. If the last test is green then it hides the failures from the UI.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Visual Runner's TheoryDiscoverer behavior and the result handling in src/TestUtils/src/DeviceTests.Runners/VisualRunner/ViewModels/TestCaseViewModel.cs. Compare how xUnit splits primitive TestData with class-based TestData, then trace the relevant xUnit source logic. Done means each class-based case appears separately and the UI preserves failures instead of showing only the last result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100