This project is an example of UI automated functional test for Google home page and search using Selenium and Cucumber.
Test scenarios are described in the feature files located here ./src/test/resources/com/automatedtest/sample.
For more info about this project, read the article "UI automated test project example with Selenium, Cucumber and Java"
You need to have Java 8 JDK installed along with maven.
To run the tests locally with Chrome, install ChromeDriver from here, add its location to your system PATH and add webdriver.chrome.driver=path/to/the/driver to your local variables.
To run the tests locally with Firefox, install GeckoDriver from here and add its location to your system PATH.
To install all dependencies, run
$ mvn clean install
$ mvn test
By default, tests will run on Chrome. To change that, specify -Dbrowser={browser}
where {browser}
is either chrome
or firefox
. If you haven't added the chrome driver path to your local variables, you can add it directly in the run command with the option -Dwebdriver.chrome.driver=path/to/the/driver
.
You can also select specific scenarios to execute using -Dcucumber.options="--tags @your_tag"
. More info about tags and how to combine them here.
Feature files can be handled with Cucumber Studio (previously called Hiptest), a test management platform. To get started with Cucumber Studio, go here. Features files in this project were exported directly from an Hiptest project using Hiptest publisher. Credentials to access the project are the following.
- login: [email protected]
- password: Eth7S9#