AndreiBanu1 / Amazon_Testing_Framework

0 stars 0 forks source link

Amazon_Testing_Framework

The purpose of a Test Automation Framework is to provide a structured and standardized approach for designing, organizing, and executing automated tests. It is a set of guidelines, best practices, and reusable components that facilitate the development and maintenance of automated test scripts.

For creating this Testing framework, I considered the following main points:

image

This framework will be based on the Page Object Model design pattern. It will also be using the WebDriver’s PageFactory class to initialize WebElements.

The project structure is compose of 4 modules:

Framework Module: This module contains the core framework components for the Amazon testing framework. It includes classes like BasePage.java and BaseTest.java, which serve as base models for page objects and test cases respectively. These classes provide common functionalities and utilities that can be used across the entire testing framework.

Domain Module: The domain module encapsulates the domain-specific functionality and business logic of the Amazon application. It defines data models, implements business rules, and provides services or utilities specific to the application's domain. This module ensures that the testing framework aligns with the application's core functionality and behaviors.

Page Objects Module: This module focuses on the implementation of Page Object Models (POMs) for the Amazon application. It contains the Page Model Factory, where all the web elements to be tested are declared. The POMs help in organizing the web elements and actions associated with specific pages, making the tests more readable, maintainable, and reusable.

Regression Tests Module: The regression tests module houses the actual test cases for the Amazon application. It utilizes the framework, domain, and page objects modules to create comprehensive regression tests. These tests verify the functionality of the application and ensure that new changes or updates do not introduce regressions or issues.

Each child module in this Maven project plays a specific role in creating a robust and maintainable testing framework for the Amazon application. The separation of concerns allows for modular development, easier debugging, and scalability as the project grows.

Framework Module

Core module

This module will contain the BasePage.java and BaseTest.java files and also any other class to be extended in future usage.

BaseTest.java: Provides the base class for all test classes. It includes common setup and teardown methods for initializing the WebDriver and handling test lifecycle. BasePage.java: Represents the base page object class that contains common methods and functionalities for interacting with web elements.

Domain Module

Page Objects Module

Regression Tests Module

This project structure provides a modular and organized approach to develop and test the application. Each module has specific responsibilities, enabling better maintainability and testability of the codebase.

The project contains the following test scenerios:

I. Login Module:

a) test with valid credentials;
b) test with invalid username;
c) test with valid username and invalid password;

II. Search Module:

a) Basic Search:

b) Advanced Search:

c) Empty Search:

d) Search Suggestions:

e) Search Results Sorting:

f) Pagination:

g) Product Details from Search Results:

h) Search Performance and Speed:

i) Search Result Validation:

j) Search Across Multiple Categories:

k) Search Result Images:

l) Search Result Link Validity:

III. Product Details Module:

a) Test verifying the product title:

b) Test verifying the product description:

c) Test verifying the product price:

d) Test verifying the product availability:

e) Test verifying the customer reviews:

f) Test verifying related products:

g) Test adding the product to the cart from the product details page:

h) Test the product details image: