miven
miven

Reputation: 51

Specflow scenarios are sorted in alphabetical order in test explorer. Any way to change that order?

I have multiple feature files and each feature file has multiple scenario outlines in my project.

I see that the hierarchy in the test explorer is something like this

  1. Project file name
  2. Assembly name
  3. Feature file names
  4. Scenarios under each feature file

So basically the tests that are seen in the test explorer are grouped by feature file names. Say I have 3 tests as below

  1. Configuration
  2. Execution
  3. Restore

I want these tests to be executed in a specific order(Restore, Configuration, Execution) and not based on the default alphabetical order

I already checked this. That is a different case and doesn't help mine

Is there any way this can be achieved?

Upvotes: 0

Views: 1094

Answers (1)

Greg Burghardt
Greg Burghardt

Reputation: 18888

The Visual Studio Test Explorer panel has some additional options for grouping and sorting test cases.

There is nothing specific to SpecFlow. You can group tests by project and then class, among others:

Screenshot of test explorer 'group by' menu

Upvotes: 0

Related Questions