You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In AspNetCore we've created ConditionalTheoryDiscoverer to allow us to skip specific TheoryData, and this has worked fine under vstest, but when we switched to building with xunit.console (and thus with PreEnumerateTheories=false) theory data that previously skipped no longer does.
I've created a pared down repro project to showcase this.
Repro steps:
Clone the above project.
cd Microsoft.AspNetCore.Testing/test; dotnet restore
dotnet xunit. See that a test which was expected to be skipped ran (and failed).
dotnet test. See that the appropriate test skipped.
We've found that this behavior can be avoided with this workaround but it seems less than ideal to just override that setting in some scenarios.
Is our implementation of CreateTestCasesForDataRow just wrong, and if so is there an example of a successful implementation of this scenario?
The text was updated successfully, but these errors were encountered:
That's true. The system was not designed to do this, as the level of skipping is at the Test Case level, and when theory pre-enumeration is turned off, there is a single Test Case for the theory (rather than one per data row).
Renaming this issue to reflect the actual needed feature.
bradwilson
changed the title
DataRows on Theories cannot be skipped when PreEnumerateTheories is false
Runners which skip theory pre-enumeration by default should offer an override switch
Dec 14, 2018
In AspNetCore we've created ConditionalTheoryDiscoverer to allow us to skip specific TheoryData, and this has worked fine under vstest, but when we switched to building with xunit.console (and thus with PreEnumerateTheories=false) theory data that previously skipped no longer does.
I've created a pared down repro project to showcase this.
Repro steps:
cd Microsoft.AspNetCore.Testing/test; dotnet restore
dotnet xunit
. See that a test which was expected to be skipped ran (and failed).dotnet test
. See that the appropriate test skipped.We've found that this behavior can be avoided with this workaround but it seems less than ideal to just override that setting in some scenarios.
Is our implementation of CreateTestCasesForDataRow just wrong, and if so is there an example of a successful implementation of this scenario?
The text was updated successfully, but these errors were encountered: