- ChromeDriver
- WebDriver
For help on using the run command, please refer to the run command help
./run -h
After installing and configuring the above pre-requisites, type the following:
git clone https://github.com/jpsugg/the-internet-tests.git
cd java-framework
chmod +x run
./run
Note: the run command pulls the docker images and configures the docker network automatically.
-
Tests locally,
./run
-
Tests against a remote Selenium Grid,
./run -r
-
Tests locally; spawns 4 threads in parallel,
./run -T 4
-
Tests against a remote Selenium Grid; spawns 2 chrome-nodes in parallel with 3 max. concurrent sessions each,
./run -r -T 2
Note: all the above commands, start and stop the Webapp and the Selenium Grid automatically.
Note2: The amount of chrome nodes that will successfully run your tests will depend on your machine. On my machine, running more than 4 nodes may turn tests unstable.
-
To manually start/stop the Webapp and Selenium Grid, without running the test suite:
./run -G start # Initializes a Selenium Grid with 1 Chrome node ./run -G start -T 7 # Initializes a Selenium Grid with 7 Chrome nodes ./run -G stop # Terminates the Grid
A test report can be found under:
target/surefire-reports/index.html
- Using ChromeDriver to write Tests for the following scenarios:
- Login Success: http://localhost:7080/login credentials: tomsmith/SuperSecretPassword!
- Login Failure: http://localhost:7080/login Login fail invalid creadentials
- CheckBoxes: http://localhost:7080/checkboxes Check and uncheck boxes
- ContextMenu: http://localhost:7080/context_menu Right-click in the box to see one called 'the-internet'. Test JavaScript alert text on Right-Click.
- Drag and Drop: http://localhost:7080/drag_and_drop Perofrm Drag And Drop in a Webdriver test.
- Dropdown: http://localhost:7080/dropdown Test dropdown using Webdriver.
- Dynamic Content: http://localhost:7080/dynamic_content Test content changes with page reload.
- Dynamic Controls: http://localhost:7080/dynamic_controls Test Dynamic Controls using Explicit Waits.
- Dynamic Loading: http://localhost:7080/dynamic_loading/2 Test Dynamic Loading using Explict Waits.
- File Download: http://localhost:7080/download Test File Download.
- File Upload: http://localhost:7080/upload Test File Upload.
- Floating Menu: http://localhost:7080/floating_menu Test Floating Menu.
- Iframe: http://localhost:7080/iframe Test iframe.
- Mouse Hover: http://localhost:7080/hovers Test Mouse Hover.
- JavaScript Alerts: http://localhost:7080/javascript_alerts Test confirm JS Alert.
- JavaScript Error: http://localhost:7080/javascript_error Test JS error.
- Open in New Tab: http://localhost:7080/windows Test Link Opens in new tab.
- Notification Message: http://localhost:7080/notification_message_rendered Test notification Message.