dotnet / dotnet/maui

Fix Visual Test Runner so that it will split up tests that use class based test cases

Open
#9,976 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-testing Task testing-infrastructure
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.

image

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

image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.