Simple framework designed to run Selenium Builder scripts.
Selenium test framework designed to run 'Selenium Builder' recorded tests on 'SauceLabs' using 'TestNG' as a threaded test runner. Get up and running on SauceLabs in just over 10 minutes (see instructions below).
Feature | Description |
---|---|
One Test Per Class | This framework works with one test per class. It could be enhanced to support multiple @Test annotated methods per class but that would require a different TestBase class to support that. |
Builder Design Pattern | This framework uses the 'Builder' design pattern to generate browser instances. |
SauceLabs Driver | Will run on a free SauceLabs account with a max of 2 threads. This demo is not designed to run local Selenium browsers but can be adjusted to do so. |
SauceLabs REST API | Pushes test results to SauceLabs to mark test as passed or failed. |
Report Logging | Logs output to the TestNG HTML report as well as to a Log4j log file. Logs the thread id during tests so that you know which thread the Selenium messages are coming from. |
TestNG | Uses TestNG as a multi-threaded test runner and configuration handler. |
No DataProvider | This framework does not use a DataProvider but if you wanted to generate browser instances from a DataProvider method, this framework could be adjusted to do so. |
Command Line Support | You can run these tests without Eclipse, from the command line, by using the command mvn.bat clean compile test-compile test. |
Selenium Builder | This framework is designed for use with Selenium Builder in mind. Using it as a general Selenium framework would take code refactoring. |
This project will run within Eclipse, IntelliJ IDEA, or from the command line using Maven.
src/test/resources/testng.xml
file and add your SauceLabs username and key into that configuration file.src/test/java/qa/se/builder
folder,
just like what is provided in the example.clean compile test-compile test
And you may use multiple names/patterns, separated by commas, to execute only 1 or more targeted tests:
mvn -Dtest=TestSquare,TestCi*le test
This framework is designed to run multi-threaded tests against SauceLabs using Maven. Jenkins can execute Maven builds and so this framework is perfect for use with Jenkins as a job/test scheduler.