Skip to content

CodecoolGlobal/test-automation-webshop-in-beta-general-qutasi

Repository files navigation

Automated Testing Project

This project contains a suite of automated tests designed for end-to-end testing of a web application. The framework is built with Java, utilizes Maven for dependency management, Selenium for browser automation, and JUnit 5 for test execution. Additionally, the project is fully Dockerized, enabling easy and consistent test execution across environments.

Table of Contents


Project Overview

This project automates the testing of core functionalities for a web application, such as:

  • User Authentication: Login/logout with valid and invalid credentials.
  • Navigation: Validation of menus, navigation bars, and page transitions.
  • Form Interactions: Filling out and submitting forms.
  • Feature Verification: Ensuring key functionalities work as intended.

System Under Test (SUT): The application under test is hosted at https://www.saucedemo.com/.


Tech Stack

  • Java
  • Apache Maven
  • Selenium
  • JUnit
  • Docker
  • GitHub Actions

Prerequisites

Before running the tests, ensure the following are installed:

  1. Java Development Kit (JDK) (version 11 or later)
  2. Maven (version 3.6.0 or later)
  3. WebDriver (e.g., ChromeDriver) – Ensure the WebDriver version matches your browser version.

Optional:

  • Docker: Required if running tests in a containerized environment.
  • Integrated Development Environment (IDE): IntelliJ IDEA or Eclipse for viewing or modifying test code.

Installation

  1. Clone the Repository
    git clone https://github.com/CodecoolGlobal/test-automation-webshop-in-beta-general-qutasi.git
    cd test-automation-webshop-in-beta-general-qutasi
    
  2. Build and run the tests using Docker Compose
    docker-compose up --build
    

Running the Tests

Using Maven

To execute all tests:

mvn clean test

To run specific test classes or methods:

mvn -Dtest=TestClassName#methodName test

Using Docker

docker-compose up 

The Docker container will automatically set up the environment, execute the tests, and save reports to /target inside the container.


Test Structure

The project follows the Page Object Model (POM) design pattern:

  • Pages: Located in src/test/java/com/codecool/models
    • Contains reusable components representing application pages.
  • Tests: Located in src/test/java/com/codecool/test
    • Includes test cases for verifying application functionality.

Test Reports

After executing the tests, reports will be available in the following directory:

/target/surefire-reports/

These reports provide detailed information about passed, failed, or skipped tests.


Troubleshooting

  • Ensure the WebDriver version matches your browser version.
  • If using Docker, verify that Docker is installed and running.
  • Check for missing dependencies or errors in the Maven build logs.
  • Update WebDriver or browser versions if compatibility issues arise.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published