Skip to content
Bootstrap project to automate a webpage using Selenium WebDriver, Java and TestNG
Java Groovy
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
pipeline_as_code DriverFactory, Listeners and reporting changed because of a npe bug Sep 19, 2018
src license added Jan 23, 2020
.gitignore General refactoring Aug 26, 2018
README.MD Update Readme.MD Dec 16, 2019
docker-compose.yml general refactoring Nov 28, 2019
pom.xml webdrivermanager updated Jan 23, 2020


The purpose of this project is to have a basic project with minimum viable testing architecture to automated web tests using Selenium WebDriver and Java as the programming language.

Languages and Frameworks

This project using the following languages and frameworks:

  • Java 8 as the programming language
  • TestNG as the UnitTest framework to support the test creation

Test architecture

We know that any automation project starting with a good test architecture. This project can be your initial test architecture for a faster start. You will see the following items in this architecture:

  • Use of Page Objects patters
  • Parallel execution
  • BaseTest
  • TestListner
  • Logging
  • Configuration through a properties file
  • yaml templates to create a Selenium Grid infrastructure on OpenShift

Do you have any other item to add on this test architecture? Please do a pull request or open an issue to discuss

Use of Page Objects patters

Parallel execution




Configuration through a properties file

The project use the a property file to configure basic mutable items, like:

  • base.url: the main app URL
  • grid.url: target grid url
  • grid.port: target grid port
  • = the name of the log folder
  • log.dateformat = the data format for the log filename

The property file is inside conf folder. This folder has three sub-folders:

  • dev:
  • test:
  • prod:

You can set different values for the properties keys based on your environment. When you run a test without inform the parameter env, the property file used will be conf/dev/

To change the environment, just use -Denv=env_name where env_name is the name of the folder inside conf folder.

E.g: running all tests using test configuration values

mvn test -Denv=test

Profiles executors on pom.xml

There is a profile called multi-browser created to execute the test suite multi_browser.xml inside src/test/resources/suites folder. To execute this suite, via command line you can call the parameter -P and the profile id.

Eg: executing the multi_browser suite

mvn test -Pmulti-browser

If you have more than one suite on src/test/resources/suites folder you can parameterize the xml file name. To do this you need:

  • Create a property on pom.xml called suite
  • Change the profile id
  • Replace the xml file name to ${suite} on the profile
  • Use -Dsuite=suite_name to call the suite
mvn test -Pweb_execution -Dsuite=multi_browser

Pipeline as a code

The two files of pipeline as a code are inside pipeline_as_code folder.

Jenkins pipeline

You can you Jenkisfile on this directory and refer pipeline_as_code/Jenkinsfile on XXXXXX item on Jenkins. This pipeline works on

You can’t perform that action at this time.