Runner Class

This is another way of configuring the IDE to run feature files.

  • Create a new class called "RunFeatures.java".
  • This class doesn't need to have any code.
  • It just need annotations to understand that cucumber features would be run through him and you can specify feature files to be picked up plus the steps package location.
  • There are bunch of other parameters that it can take, to be discussed later.

Here is a sample code for the same.

@RunWith(Cucumber.class)
@CucumberOptions (features = "src/test/java/features/")
public class RunFeatures {
}

[Screen]

Now if you just do a right click and Run "RunFeatures", that should run the tests.

How Awesome!

results matching ""

    No results matching ""