This project automates the testing of various functionalities on the Magento Software Testing Board's Luma website using Selenium, TestNG, DataProvider, and the Page Object Model (POM) design pattern. The functionalities include registration, sign-in, password change, adding addresses, adding products to the wishlist, and adding products to the cart.
-
src/main/java: Contains the main Java files for the project.
- pages: Page Object Model classes representing the web pages.
- tests: Test classes containing the test methods.
-
src/test/resources: Contains the test resources.
- testdata: Test data files.
-
pom.xml: Maven configuration file.
-
testng.xml: TestNG configuration file.
- Java: Programming language (JDK 21).
- Selenium WebDriver: For browser automation.
- TestNG: Testing framework.
- POM (Page Object Model): Design pattern for enhancing test maintenance and reducing code duplication.
- Eclipse IDE: Integrated development environment.
- Maven: Dependency management tool.
- Java JDK 21
- Selenium WebDriver
- TestNG
- Eclipse IDE
- Maven
-
Clone the repository:
git clone https://github.com/yourusername/magento-automation.git
-
Open the project in Eclipse.
-
Configure Maven to download the required dependencies:
mvn clean install
-
Navigate to the
src/test/java
directory. -
Run the desired test classes using TestNG.
-
Registration:
- Test creating an account with first name, last name, email, password, and confirm password.
- Registration Test Code
-
Sign-In:
- Test the login functionality with valid and invalid credentials.
- Sign-In Test Code
-
Change Password:
- Test changing the password for a user.
- Change Password Test Code
-
Add Address:
- Test adding a new address for a user.
- Add Address Test Code
-
Wishlist:
- Test adding products to the wishlist.
- Wishlist Test Code
-
Add to Cart:
- Test adding products to the cart.
- Add to Cart Test Code
Test data for the scenarios are provided using DataProvider methods. The data provider methods supply the test data to the test methods.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For any inquiries or support, please contact Syed Salma at [email protected].
Feel free to adjust the links, email, and any other details to match your specific project setup and personal information.