Sebazzz/NUnitTestOrdering

Run tests from TFS

AutomationSifu opened this issue · 6 comments

Is there a specific Test Filter Criteria to use when trying to run the tests from TFS for a build?

For some reason it's not picking up the tests correctly.

This has run fine in the past before using the NUnittestOrdering library.

  • It seems when I don't enter a filter it's picking up the unordered test.

Thanks!

I looked at the Readme and I don't see how to set the filter. Is it in a particular section?

Sorry, the NUNIT readme. You can use regular filters, and check with the GUI how to build them.

For this item I'll take some of the complexity out by not trying to run from TFS but will try to use the filters with an NUnit runner first. Is there a way to run tests using your library with the NUnit console? I may have the incorrect name of the NUnit tool. I know the NUnit gui runner is straight forward and doesn't require filters, so I didn't think it would help with this item.

Thanks!

Figured this out.

Now TFS is called Azure DevOps.

In Azure Devops go to your Build pipeline and edit the VsTest - testAssemblies task.
Go to the Test filter criteria section
Enter the following text: FullyQualifiedName~Ordered.EnableTestOrdering

Note: This line will pick up all tests that are enabled (uncommented out) in your EnableTestOrdering.cs file in your Automation project.

Thanks!