This repository contains automated test scripts for end to end web application testing using Selenium and TestNG. The tests are designed for cross-browser testing, specifically on Chrome and Safari.
Make sure you have the following software installed on your machine:
-
baseNg.java: This class initializes the WebDriver based on the specified browser (Chrome or Safari) and performs setup and teardown operations for each test class.
-
CreateNewProfile.java: This class contains tests related to creating a new user profile, registering, and logging out. It extends the
baseNg
class for browser setup. -
loginNewProfile.java: This class focuses on user login, searching for products, and adding items to the cart. It also extends the
baseNg
class for browser setup.
The testng.xml
file orchestrates the test suite, allowing parallel execution of tests on both Chrome and Safari browsers.
To execute the tests, run the testng.xml
file. Ensure that the necessary drivers (chromedriver and safaridriver) are available in the specified paths.
- For user registration, random email addresses are generated using Apache Commons Lang's
RandomStringUtils
.
- The tests use explicit waits for synchronization, enhancing reliability.
- The project is designed to facilitate easy integration into continuous integration (CI) pipelines.