Automation framework using SerenityBDD and JUnit4 for WebUI Testing.
@author: Thai Nguyen
In order to run the test, please follow the steps-by-steps guidance below.
- Clone this github repository to your local using CLI or the tool of choice (in my case it's Github Desktop)
- Open the project using your favorite IDE. In case of prompting for Gradle or Maven please chose maven
- Install maven and adding maven support to your IDE.
- Install Java 11 or above (code tested with Java 11)
- Just simply put
mvn clean verify
in your terminal and run the test
- In case you want to run with different browser, please add
-Dwebdriver.driver=$YOUR_BROWSER_OF_CHOICE
aftermvn clean verify
- e.g:
mvn clean verify -Dwebdriver.driver=chrome
- The default browser will be Chrome
- The framework provide you a full-fledged HTML report that you will get after running the command
mvn clean verify
from above. - You can find the link to the report in the Stacktrace like this
- click on the link (notice that sometime IntelliJ will not recognize full link so please copy the link from file://....)
- The test report will look like this
- The test is done when successively passed 3 times in a row
This test using Serenity BDD framework as the core functional handling. A brief about Serenity, it's an opensource automation framework that made web application/ web services testing easier.
For this test, I'm mainly using Serenity Junit integration capability to run Selenium test.
Currently, I'm using Mac so there's no way to test out the Internet Explorer, so I'm using Edge instead. In case you want to run Edge, just adding Edge into the parameter mvn clean verify -Dwebdriver.driver=Edge