Skip to content

Skipped tests count as not run - #3243

Merged
Amaury Levé (Evangelink) merged 5 commits into
microsoft:mainfrom
Evangelink:skipped-not-run
Jul 11, 2024
Merged

Amaury Levé (Evangelink) merged 5 commits into
microsoft:mainfrom
Evangelink:skipped-not-run

Conversation

@Evangelink

Copy link
Copy Markdown
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

public static Type[] WellKnownTestNodeTestRunOutcomeProperties { get; } =
[
typeof(PassedTestNodeStateProperty),
typeof(SkippedTestNodeStateProperty),

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.

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

# Conflicts:
#	test/UnitTests/Microsoft.Testing.Platform.UnitTests/Program.cs
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