Environment
Platform: Linux/MacOS/Windows
Java: 11
Maven: 3.8.1
Docker: 19.03.8
Frameworks/Libraries
Selenide: 5.20.4 - WebDriver
Selenoid: 1.10.3 - Hub
Selenoid-UI: 1.10.3 - Selenoid UI
TestNG: 7.4.0 - Testing Framework
ReportPortal: 5.3.5 - Reporting
Stack:
- Selenide (test automation framework)
- Selenoid (Hub)
- TestNG (testing framework)
- Maven (project management tool)
- ReportPortal (reporting tool)
├─── .github
│ └─── workflows
│ └─── main.yml
├─── build
│ └─── reports
│ └─── tests
├─── config
│ └─── browsers.json
├─── src
│ ├─── main
│ │ ├─── java
│ │ │ ├─── automation.builders
│ │ │ │ └─── **/*Builder.java
│ │ │ ├─── automation.entities
│ │ │ │ ├─── browser
│ │ │ │ │ ├─── Browser.java
│ │ │ │ │ ├─── ChromeBrowser.java
│ │ │ │ │ └─── FirefoxBrowser.java
│ │ │ │ └─── **/**.java
│ │ │ ├─── automation.enums
│ │ │ │ └─── **/**.java
│ │ │ ├─── automation.forms
│ │ │ │ └─── **/*Form.java
│ │ │ ├─── automation.pages
│ │ │ │ └─── **/*Page.java
│ │ │ └─── com.d3m0.automation.utils
│ │ │ ├─── BaseTest.java
│ │ │ ├─── LoadingPageFactory.java
│ │ │ ├─── MyListener.java
│ │ │ └─── Verify.java
│ │ └─── resources
│ │ ├─── log4j2.xml
│ └─── reportportal.properties
│ └─── test
│ ├─── java
│ │ └─── testcases
│ │ └─── **/*Test.java
│ └─── resources
│ └─── testng.xml
├─── .gitignore
├─── docker-compose.yml
├─── pom.xml
├─── README.md
└─── update_browsers.sh
Installation
- Clone project.
- Make sure you have recent Docker installed.
- Browsers that will be used described in config/browsers.json. Chrome and Firefox images included into docker_compose.yml. If you need to update browsers, edit config/browsers.json (instructions could be found here, list of available images is here). Download browser images manually (
docker pull image
whereimage
specified in config/browsers.json) or automatically using jq tool. See execution command in update_browsers.sh. - If you're running docker on Windows, be sure to update docker-compose.yml (uncomment Windows-related
postgres.volumes
section andvolumes
at the end of the file) for correct ReportPortal work. - Run
docker-compose up --force-recreate -d
to start Selenoid, Selenoid UI and ReportPortal.
Execution
- If you want to use Selenoid as a hub, update
selenoid.hub.address
in pom.xml with your actual IP address (docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id
). If you want to use built-in WebDriverManager just set parameterselenoid.enabled
to false. - Edit source/test/resources/testng.xml to include or exclude your test-cases.
- Setup RP:
- navigate to ReportPortal instance (by default http://localhost:8080)
- login as administrator (superadmin/erebus)
- click on arrow menu icon in a top-right corner and select Administrate
- click Add New Project button
- set name of your project and all other settings
- click Back to Project button in top-right corner
- select your newly created project from dropdown in top-left corner
- select Profile from dropdown in top-right corner
- copy configuration properties to your reportportal.properties
- Run
mvn test
command to execute whole suite.
Results
- to check in-browser execution, navigate to your Selenoid-UI instance (e.g. localhost:8090)
- to check reports, navigate to ReportPortal instance (e.g. localhost:8080)