This Test Automation Framework implements Page Object Model design pattern for structuring locators and (inter)actions together in Java classes by page/component, is used to run UI automation tests for "autobilis.lt PASKOLA" (powered by Mokilizingas) against Selenium/W3C WebDriver, has a parallelized cloud execution ability in place, and could be potentially integrated into Jenkins CI pipeline.
- Oracle JDK 1.8 (8u231)
- IntelliJ IDEA Ultimate 2019.3.2 (you may also import this repo into any Java-supported IDE as a Maven project)
- JUnit 4.13
- Selenium 4.0.0-alpha-4 bindings for Java
- ChromeDriver 79.0.3945.36 (the WebDriver used for this project is built for macOS, however it may be adapted to your platform of choice by downloading a desired WebDriver, then placing it within the vendors folder and finally making changes to the 34th row of src/test/java/tests/BaseTest.java)
- geckodriver v0.26.0 (the same strategy is applicable for this WebDriver for Firefox as well, only this time it is the 38th row which has to be revised)
- Saucerest 1.0.43 (you still need to use your own SAUCE_USERNAME and SAUCE_ACCESS_KEY defined as system environment variables)
- Maven Surefire Plugin 3.0.0-M4 (for parallelized cloud execution)
Run tests (from src/test/java/tests/TestApplyForLoan.java) one-by-one or altogether, just as you normally would.
Make sure you land on a working directory having pom.xml (pwd
, cd
, xor ls
may help for Unixers), and from there run mvn clean test
(it is required to have Apache Maven on your system upfront; it is deadly simple for macOS users).
- Tests scripts are tagged as "shallow" (critical tests for quick feedback) and "deep" (less critical ones and/or these which potentially could take longer to run). You may choose what you want to run (e.g.,
mvn clean test -Dgroups=test.groups.Deep
). - Besides running tests against different browsers locally (only Chrome and Firefox supported at this moment), you may also execute them in the cloud using Selenium Grid provided by Sauce Labs (e.g.,
mvn clean test -Dhost=saucelabs -DplatformName='Windows 10' -DbrowserVersion=11.0
).
- Finish setting parallelized cloud execution up.
- Set up a CI pipeline in Jenkins.