You have put great effort developing your set of automated tests and now is the moment to let them work their magic.
We highly recommend you to read the following guide on tags for organising and running a specific subset of scenarios.
To run the tests simply execute at the project root mvn test. This will run all
the tests available. It is possible to run the tests with more control over the options.
Some examples:
-
mvn clean test "-Dcucumber.options=--tags @DEV" -DBrowserType=chrome -DIsRemoteInstance=falsecleans previous results and runs only the test scenarios annotated with the@DEVtag on achromebrowser, locally. -
mvn test "-Dcucumber.options=--tags @smoke @perf" -DBrowserType=firefox -DTestEnvironment=my-envruns the test scenarios annotated with@smokeand@perfon afirefoxbrowser using themy-envparameters that are set on thetestEnvironment.jsonfile -
mvn test "-Dcucumber.options=--tags @Regression" -DSeleniumHubUrl=http://localhost:4444/wd/hub -DIsRemoteInstance=truerun the tests scenarios annotated with@Regressionon a remote Selenium Grid that is running onlocalhost:4444
The parameters -D<Parameter>= being passed on the command line are overriding the existing configuration set
on the environment.properties file.
For IntelliJ users
Simply with the right click to run your feature files or right clicking over a scenario to just run that specific one.
This runs the tests with the setup described in environment.properties.