Practicing knowledge of Selenium with TestNG using clothing web shop. This is a demo shop for testing automation scripts.
• Project Name: Magento Shop Website
• Test Objective: To verify that the clothing shop website is functioning correctly in all aspects such as navigation, user interaction, shopping cart, checkout, and payment processing.
• Testing Tool: Selenium WebDriver, Java, TestNG.
• Test Type: Functional, UI, Usability Testing.
• Test Environment: Latest version of Chrome.
• In-Scope:
Functional testing of the website's main features: navigation, login, product browsing, search functionality, shopping cart, checkout process.
Usability testing for a smooth shopping experience.
• Out-of-Scope:
Third-party integrations outside the website (e.g., payment gateway failures).
Backend database validation.
• Test Approach: Manual test automation with Selenium WebDriver, Java and TestNG applying the Page Object Model for maintainable test scripts.
• Testing Levels:
Unit Testing: Testing individual components like search functionality.
Integration Testing: Ensuring multiple components work together (e.g., adding items to the cart and proceeding to checkout).
End-to-End Testing: Verifying the full user experience from browsing to completing a purchase.
Here is a list of test cases for the website:
Objective: Verify that users can not log in when user email field or password field is empty.
• Preconditions: User is on a home page.
• Test Steps:
-
Enter valid email in the user email field (or leave empty).
-
Enter valid password in the password field (or leave empty).
-
Click on the "Sign In" button.
-
Verify that empty field shows error message and log in is not successful.
• Expected Result: The user should not be logged in.
Objective: Verify that users can not log in with invalid credentials.
• Preconditions: User is on a login page.
• Test Steps:
-
Enter invalid email in the user email field.
-
Enter incorrect password in the password field.
-
Click on the "Sign In" button.
-
Verify that the user is informed with the error message, that log in was not successful.
• Expected Result: The user should not be logged in.
Objective: Verify that users can successfully log in with valid credentials.
• Preconditions: User is on a login page.
• Test Steps:
-
Enter a valid email in the user email field.
-
Enter the correct password in the password field.
-
Click on the "Sign In" button.
-
Verify that the user is redirected to the homepage or dashboard.
• Expected Result: The user should be successfully logged in and redirected to the homepage or dashboard.
• Objective: Verify that the product detail page shows correct information.
• Preconditions: User is on a product home page.
• Test Steps:
-
Click on a product.
-
Verify that the product detail page opens with the correct information (product name, size options, price and color).
• Expected Result: All information about the product should be displayed correctly.
• Objective: Verify that the search functionality works correctly.
• Preconditions: User is on the homepage.
• Test Steps:
-
Enter a product name ("watch", "top", "jacket") into the search bar.
-
Click the "Search" button.
-
Verify that the search results display relevant products.
• Expected Result: Relevant products matching the search term should be displayed.
• Objective: Verify that the main navigation menu is displayed and the links navigate to the correct pages.
• Preconditions: User is on the homepage.
• Test Steps:
-
Open the homepage.
-
Click on each menu item ("What's new", "Sign In", "Create an Account", "Search").
-
Verify that each link redirects to the correct page.
• Expected Result: All links should redirect to the corresponding pages without errors.