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

Add failed logic for trx logger when TreatNoTestAsError is set to true #2758

Merged
merged 5 commits into from
Feb 18, 2021

Conversation

Sanan07
Copy link
Contributor

@Sanan07 Sanan07 commented Feb 17, 2021

Description

Add logic for trx logger when TreatNoTestAsError parameter is set to true to show ResultSummary as Failed.

Related issue

Fix : #2707

Example of the change :

  <ResultSummary outcome="Failed">
    <Counters total="0" executed="0" passed="0" failed="0" error="0" timeout="0" aborted="0" inconclusive="0" passedButRunAborted="0" notRunnable="0" notExecuted="0" disconnected="0" warning="0" completed="0" inProgress="0" pending="0" />
    <RunInfos>
      <RunInfo computerName="SAYUZBAS-SFB2" outcome="Warning" timestamp="2021-02-17T18:20:41.7410456+01:00">
        <Text>No test is available in C:\Users\sayuzbas\source\repos\EmptyTestProject\EmptyTestProject\bin\Debug\EmptyTestProject.dll. Make sure that test discoverer &amp; executors are registered and platform &amp; framework version settings are appropriate and try again.</Text>
      </RunInfo>
    </RunInfos>
  </ResultSummary>

Note : Changed ResultSummary outcome="Failed" previously was ResultSummary outcome="Completed" even if no tests ran.

The change only applies for ResultSummary. Trying to change RunInfo outcome result in having several RunInfo line in Xunit and Nunit adapters

@Sanan07 Sanan07 marked this pull request as draft February 17, 2021 17:41
@Sanan07 Sanan07 marked this pull request as ready for review February 17, 2021 18:49
@Sanan07 Sanan07 merged commit cb73ce2 into microsoft:master Feb 18, 2021
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.

Add failed logic for trx logger when TreatNoTestAsError is set to true
2 participants