Skip to content

Conversation

vagisha-nidhi
Copy link
Contributor

Issue related #499

  1. Adding setting option for marking not runnable test outcome as failed when specified.
  2. Modified UTs for the same

}

var testResult = unitTestResult.ToTestResult(test, startTime, endTime, MSTestSettings.CurrentSettings.MapInconclusiveToFailed);
var testResult = unitTestResult.ToTestResult(test, startTime, endTime, MSTestSettings.CurrentSettings.MapInconclusiveToFailed, MSTestSettings.CurrentSettings.MapNotRunnableToFailed);
Copy link
Member

Choose a reason for hiding this comment

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

Instead of passing individual values from settings : MapInconclusiveToFailed and MapNotRunnableToFailed, prefer passing the entire settings. In future, we can extract whichever value will be required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed. Passing entire adapter settings now. Modified the tests with these as well.

/// <param name="mapNotRunnableToFailed">Should map not runnable to failed</param>
/// <returns>The Test platforms outcome.</returns>
internal static TestOutcome ToTestOutcome(UnitTestOutcome unitTestOutcome, bool mapInconclusiveToFailed)
internal static TestOutcome ToTestOutcome(UnitTestOutcome unitTestOutcome, bool mapInconclusiveToFailed, bool mapNotRunnableToFailed)
Copy link
Member

Choose a reason for hiding this comment

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

Same here. Pass entire settings.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed. Passing entire adapter settings now.

// <MSTestV2>
// <CaptureTraceOutput>true</CaptureTraceOutput>
// <MapInconclusiveToFailed>false</MapInconclusiveToFailed>
// <MapNotRunnableToFailed>false</MapNotRunnableToFailed>
Copy link
Member

Choose a reason for hiding this comment

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

Nice 👍

@jayaranigarg
Copy link
Member

jayaranigarg commented Dec 21, 2018

Tagging @pvlakshm to review this as well.

@vagisha-nidhi
Copy link
Contributor Author

@PBoraMSFT Can you please review this and see if it's good to check in?

Copy link
Contributor

@singhsarab singhsarab left a comment

Choose a reason for hiding this comment

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

What about the documentation ?

And should we make this discoverable, is this is marked false, probably a message like, "Unable to run some tests, please set "MapNotRunnableToFailed" in MSTest runsettings to mark these tests as failed." ?

Overall, changes look good.

@vagisha-nidhi vagisha-nidhi merged commit bec9139 into microsoft:master Jan 4, 2019
@vagisha-nidhi
Copy link
Contributor Author

@PBoraMSFT This would need to be updated in the documentation that MapNotRunnableToFailed can be set to true to mark the not runnable tests as failed?

@PBoraMSFT
Copy link

@vagisha-nidhi @singhsarab - let's not accumulate doc debt on our repos. When raising PRs, please include doc changes as well - this has been pending since Dec. Can you please log a new GH issue for this and fix it? All testfx docs are right here in the repo.

@singhsarab
Copy link
Contributor

singhsarab commented Apr 22, 2019

@PBoraMSFT I had left a comment for it. Not sure if we should be blocking the PRs for that (I vote for blocking the PR)
/cc: @cltshivash

All testfx docs are right here in the repo.
Docs go in the testfx-docs repo.

@vagisha-nidhi Can you please add the docs for this one please.

@vagisha-nidhi
Copy link
Contributor Author

Updating the docs via microsoft/testfx-docs#71

This was referenced Oct 13, 2025
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.

4 participants