Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skipped tests count as not run #3243

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Conversation

Evangelink
Copy link
Member

Update the logic to consider skipped tests as not run:

  • If all tests are skipped, exit code is 8
  • If all tests are skipped, summary considers run as failed

Fixes #3216

@@ -15,7 +15,6 @@ internal static class TestNodePropertiesCategories
public static Type[] WellKnownTestNodeTestRunOutcomeProperties { get; } =
[
typeof(PassedTestNodeStateProperty),
typeof(SkippedTestNodeStateProperty),
Copy link
Contributor

Choose a reason for hiding this comment

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

this could break some extension I suppose, is it needed?

Copy link
Member Author

Choose a reason for hiding this comment

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

Type is internal so it should be fine. Also, yes the array is used directly to count test that run. As we said, skipped should not be considered as run.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's internal but used around by built-in extensions too, I would take a look around before and in case duplicate it

Copy link
Member Author

Choose a reason for hiding this comment

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

Not used anywhere else in this repo (all OSS extensions: https://github.com/search?q=repo%3Amicrosoft%2Ftestfx%20WellKnownTestNodeTestRunOutcomeProperties%20&type=code) but indeed retry is impacted

# Conflicts:
#	test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs
@Evangelink Evangelink merged commit 5c4e0e5 into microsoft:main Jul 11, 2024
6 checks passed
@Evangelink Evangelink deleted the skipped-not-run branch July 11, 2024 19:26
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.

If all tests are skipped, exit code is 0 not 8
2 participants