-1

I am working on the automation of test cases with the Cucumber JVM 1.2.2 framework and Selenium. Each test case corresponds to a Feature file.

I have multiple Features files organized in folders, and I need to be able to define the order of execution through a text file. For example, the text file can be like this:

file3.feauture
file1.feature
file5.feature
file2.feature
file4.feature

At this time the execution is called through a tag that is placed in the files that will be executed.

Ray
  • 1,134
  • 10
  • 27

2 Answers2

1

First of all, the version you are using is very old. We are currently on 4.7.4 (see: https://github.com/cucumber/cucumber-jvm). Note that the group-id changed from "info.cukes" to "io.cucumber" with v2.

Second of all, it is recommended to have your tests be independent of each other. From the Cucumber FAQ: "Each scenario should be independent; you should be able to run them in any order or in parallel without one scenario interfering with another.

Each scenario should test exactly one thing so that when it fails, it fails for a clear reason. This means you wouldn’t reuse one scenario inside another scenario.

If your scenarios use the same or similar steps, or perform similar actions on your system, you can extract helper methods to do those things."

Marit
  • 2,399
  • 18
  • 27
0

Cucumber Ran the feature file in Alphabetical order.

Rename your feature file like :

Cfile3.feauture
Afile1.feature
Efile5.feature
Bfile2.feature
Dfile4.feature
Shubham Jain
  • 16,610
  • 15
  • 78
  • 125