Home

Awesome

Java, Cucumber, JUnit and Selenium Automation Test Framework

Basic automation test framework following action and page object models, using Selenium to interact with the web browser, Cucumber to frame the tests, and JUnit to provide a standard report on the tests. Features built in support for local testing, Selenium Grid, and Browserstack, and uses Hamcrest for better reporting on test failures.

Software Requirements

To run the tests on Google Chrome:

To run the tests on Internet Explorer:

To run the tests on Safari on OS X:

Running the tests

Reports from the test are output to the folder 'reports', separated into folders based on date, platform and browser.

You can also add configurations to the mvn test command:

Configuration

In the path src/test/resources is a 'config.properties' file. These are the valid configurations:

KeyValuesDescriptionRequired?
seleniumEnvironmentlocalRuns the tests directly on your machineyes
gridRuns the tests on the Selenium Grid specified in 'seleniumHub'
browserstackRuns the tests on Browserstack using the 'browserstackUsername' and 'browserstackPassword' specified
browserSee 'Browser choices' sectionSets your browser based on the choices available in the enumyes
browserVersionSets the version of the browser you want to use when running on Selenium Grid or Browserstack. Must match the options you have set in your Selenium Grid or those supported by Browserstackno
platformSee 'Platform choices' sectionSets your platform based on the choices available in the enumno
platformVersionSets the version of the platform you want to use when running on Selenium Grid or Browserstack. Must match the options you have set in your Selenium Grid or those supported by Browserstackno
seleniumHubAddress of Selenium HubThe address to your Selenium Grid hub, e.g. http://192.168.0.101:4444/wd/hubOnly when using seleniumEnvironment:grid
browserstackResolutionWxLResolution used by BrowserstackOnly when using seleniumEnvironment:browserstack
browserstackUsernameUsername used by BrowserstackOnly when using seleniumEnvironment:browserstack
browserstackPasswordAutomation key used by BrowserstackOnly when using seleniumEnvironment:browserstack
browserstackProjectProject name used by BrowserstackOnly when using seleniumEnvironment:browserstack
browserstackBuildBuild version used by BrowserstackOnly when using seleniumEnvironment:browserstack

Browser choices

Additonal browser choices can be added to the browser.enum file within the tests. The format is based on the style used by Browserstack, and your Selenium Grid must use the same stylings.

Platform choices

Additonal platform choices can be added to the platform.enum file within the tests. The format is based on the style used by Browserstack, and your Selenium Grid must use the same stylings.

Important Links

Official Website

Maven

ChromeDriver

InternetExplorerDriver

SafariDriver

Selenium Documentation

Browserstack

Hamcrest