Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lynix28/web-selenium-example

Web UI automation test project example using Selenium
https://github.com/lynix28/web-selenium-example

cucumber cucumber-testng selenium selenium-webdriver testng web-testing

Last synced: about 2 months ago
JSON representation

Web UI automation test project example using Selenium

Awesome Lists containing this project

README

        

## web-selenium-example

pipeline status

WebUI automation test example project with Selenium.

---

Tools:

- Cucumber-TestNG as test framework and assertion.
- Maven as test builder and runner.
- Selenium as webdriver client.
- Allure as test reporter.

---

How to setup:

- Install `Maven`
- Install `Java SE`
- Clone this repository
- Download the webdriver and save the file inside `webdriver` directory (you need to create the directory inside the root project)
- Make sure the browsers are installed in the local machine. \
This project support to run in `chrome | edge | firefox | safari`. \
For Safari, you need to enable the webdriver by the following command `safaridriver --enable`.

---

How to run the test:

- `mvn test` | to run the test with default settings (Brower = Chrome - Headless = False).
- `mvn test -Dbrowser=edge` | to run the test with another web browser.
- `mvn test -Dheadless=true` | to run the test in HEADLESS mode.
- `mvn test -Dbrowser=edge -Dheadless=true` | to run the test in another web browser and in HEADLESS mode.
- `mvn test -Dsuite=SmokeTest` | to run the test only for the specific test suite.
- `mvn test -Dtest=RunnerLogin` | to run the test only for the specific test runner class / file.

---

Report:

- The file report will be generated and saved to `target` directory
- To open the report run `mvn allure:report allure:serve`