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

When all tests are skipped, Trx report outcome is "Completed" #3768

Open
thomhurst opened this issue Sep 5, 2024 · 2 comments
Open

When all tests are skipped, Trx report outcome is "Completed" #3768

thomhurst opened this issue Sep 5, 2024 · 2 comments

Comments

@thomhurst
Copy link
Contributor

thomhurst commented Sep 5, 2024

Not sure if you consider this a bug.

Repro:

  • Pass --report-trx flag
  • Execute/filter 1 test that gets skipped
  • CLI correctly fails with
Test run summary: Zero tests ran - bin\Debug\net8.0\TUnit.TestProject.dll (net8.0|x64)
  total: 1
  failed: 0
  succeeded: 0
  skipped: 1
  duration: 1s 080ms

However in the trx report, the ResultSummary tag has an outcome of Completed.

This to me implies that the report is considered a successful run, however the CLI fails with an error code, so the trx should probably have a failed outcome also?

  <ResultSummary outcome="Completed">
      ...
  </ResultSummary>
@MarcoRossignoli
Copy link
Contributor

The trx extension doesn't know about the failure policy....we need to understand if this should be reflected into the trx or not. At the moment the step would fail and the exit code will be not zero.

@thomhurst
Copy link
Contributor Author

If the CLI returns an error code your test run has failed, so the trx should reflect that imo.

Currently we have a cli failure but a trx success. Seems like you need something that aggregates something into a final results model, and then pushes that to all data consumers? That way everything would be sync'd up

@MarcoRossignoli MarcoRossignoli self-assigned this Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants