This is a Cucumber-Java Project. Followed BDD approach
First you need to clone the 'master' branch of this project into your local machine. After that you can open configuration.properties file and set your desired browser for testing.
Supported Browsers : Chrome, Firefox, Internet Explorer(IE), Microsoft Edge (EdgeHTML), Safari
Make sure that you have already:
- Installed the browser you want to execute in your local machine.
- Check your browser version and driver compatibility
/src/test/resources/driver
Notes :
- "Enhanced Protected Mode" must be disabled for IE 10 and higher.
- Firefox driver - https://github.com/mozilla/geckodriver/releases
- Chrome driver - https://chromedriver.chromium.org/downloads
You can open the project by any IDE (Select pom.xml
file when opening the project)
You can find the available test suites in /src/test/resources/test_suite
You can change the Platform, Browser name and Browser version according to your local machine.
Notes:
- Platform should be
linux
,windows
ormac
. - Browser name should be
chrome
,firefox
,edge
,ie
orsafari
.
Goto SmokeTest.xml and configure your browser details and start Run.
Make sure that you successfully import all the maven dependencies. After that run the following command to start the execution,
mvn clean install -P<suite_name>
To run scenarios in parallel,
mvn clean install -PSmokeTest
To run scenarios in cross browsers at the same time
mvn clean install -PSmokeTest_Parallel
Enable Selenium grid - To run scenarios in cross browsers in different Operating Systems at the same time.
Set Up the selenium grid. Change the Selenium grid URL in the configuration.properties file.Also, Turn On the grid-mode. Then run your distributed test suite.
mvn clean install -PSmokeTest_Distributed
First, you need to download allure from https://github.com/allure-framework/allure2/releases
Then add the bin folder location into your PATH variable.Once you run your test suite, 'allure-results' directory will create inside target directory. Copy the path of it. Then open the command prompt. Run the following command,
allure serve <location to your allure-results directory>
curl -o allure-2.6.0.tgz -Ls https://dl.bintray.com/qameta/generic/io/qameta/allure/allure/2.6.0/allure-2.6.0.tgz
sudo tar -zxvf allure-2.6.0.tgz -C /opt/
sudo ln -s /opt/allure-2.6.0/bin/allure /usr/bin/allure
allure --version
Once you run your test suite, 'allure-results' directory will create inside target directory. Copy the path of it. Then open the command prompt. Run the following command,
allure serve <location to your allure-results directory>