Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what order do cucumber tests get run

Tags:

ruby

cucumber

I know cucumber runs each test in a feature file from top down, but my question is, in what order do feature files get run? It doesn't seem to be alphabetically, or in any structure order.

like image 563
Matt Westlake Avatar asked Mar 03 '15 15:03

Matt Westlake


People also ask

How do you order test cases in Cucumber?

We can set the order of execution for test methods in Cucumber with the help of order keyword. Test methods are assigned with order in the step definition file. The test method with lower order executes first followed by the methods with higher orders.

Can we set priority in Cucumber?

Yes, you can set a priority in cucumber scenarios.


1 Answers

According to Justin Ko's website, order of execution is determined as follows:

  1. Alphabetically by feature file directory
  2. Alphabetically by feature file name
  3. Order of scenarios within the feature file
like image 76
alannichols Avatar answered Sep 28 '22 07:09

alannichols