This repository contains an end-to-end test automation case study covering Web UI, Mobile UI, and API layers.
- Web UI Automation
- Mobile UI Automation
- API Automation
Each section is implemented as an independent automation module
test-automation-case
βββ docker-compose.yml
βββ README.md
βββ web-ui
βββ mobile-ui
βββ restful-booker-karate
This project is a Web UI Test Automation framework developed as part of a technical case study.
- Java 21
- Selenium WebDriver
- TestNG (parallel execution)
- Cucumber BDD
- Maven
- Docker
- Selenium Grid 4
- Jenkins
- Cucumber Reports (Jenkins Plugin)
web-ui
βββ pom.xml
βββ src
βββ test
βββ java
β βββ com
β βββ vakifbank
β βββ hooks
β β βββ Hooks.java
β βββ pages
β β βββ BasePage.java
β β βββ BookStorePage.java
β βββ runners
β β βββ TestRunner.java
β βββ stepdefinitions
β β βββ AlertsSteps.java
β β βββ InvalidNavigationSteps.java
β β βββ PracticeFormSteps.java
β β βββ BookStoreSteps.java
β βββ utils
β βββ DriverManager.java
βββ resources
βββ features
βββ alerts.feature
βββ book_store.feature
βββ invalid_navigation.feature
βββ practice_form.feature
- Book Store list validation (row count & book details)
- Practice Form validation
- Only mandatory fields
- All fields filled
- Alert popup validations
- Invalid menu navigation (negative scenario)
Each scenario includes necessary validations as required by the case.
- Parallel execution is enabled using TestNG
- Each scenario runs with its own WebDriver instance via
ThreadLocal - Fully compatible with Selenium Grid 4
Selenium Grid 4 is executed using Docker containers:
selenium/hubselenium/node-chromeselenium/node-edge
Tests are executed remotely via RemoteWebDriver.
Browser selection is controlled using a Maven parameter:
mvn verify -Dbrowser=chrome
mvn verify -Dbrowser=edge- Centralized DriverManager
- Uses ThreadLocal for parallel safety
- Supports Chrome and Edge
- No usage of Thread.sleep() (explicit waits only)
- Screenshots are captured automatically for failed scenarios
- Implemented using a Cucumber @After hook
- Screenshots are attached directly to the Cucumber scenario
- Visible inside the Cucumber HTML report in Jenkins
π Location in report: Scenario β Hooks β After β Embedded image (png)
Jenkins Cucumber Report
- Jenkins Cucumber Reports Plugin is used
- Reports are generated from cucumber-report.json
- Includes:
- Scenario status
- Step details
- Charts
- Embedded screenshots for failed scenarios
- Jenkins Freestyle Job
- Pulls latest code from GitHub repository
- Runs tests using Maven (verify phase)
- Executes tests on Selenium Grid 4
- Publishes Cucumber HTML reports automatically
- Prerequisites:
- Java 21
- Maven
- Docker & Docker Compose
Start Selenium Grid
docker-compose up -dRun Tests
mvn verify -Dbrowser=chrome- All requirements defined in the case study are fully implemented
- Framework is scalable and easily extendable
- Clean architecture using Page Object Model
- CI-ready with Jenkins and Docker-based Grid
This module covers Mobile UI test automation for an Android application as part of the technical case requirements.
- Java 21
- Appium
- UiAutomator2
- Android Emulator
- Cucumber BDD
- TestNG
- Maven
- Appium Inspector
mobile-ui-automation
βββ pom.xml
βββ src
β βββ test
β βββ java
β β βββ com
β β βββ akakce
β β βββ driver
β β β βββ DriverManager.java
β β βββ hooks
β β β βββ Hooks.java
β β βββ pages
β β β βββ BasePage.java
β β β βββ AkakcePage.java
β β βββ runners
β β β βββ TestRunner.java
β β βββ steps
β β βββ AkakceSteps.java
β βββ resources
β βββ features
β βββ akakce.feature
- Tests were executed on an Android Emulator created via Android Studio
- Appium Server was started manually before test execution
- UI element inspection and locator validation were performed using Appium Inspector
- Search for a product (Laptop)
- Apply multiple filters
- Sort results by lowest price
- Select a specific product from the list
- Validate seller button visibility
- Compare listing price with detail page price (partially implemented)
- Screenshots are captured automatically for failed scenarios
- Implemented via Cucumber @After hook
- Screenshots are embedded directly into the Cucumber report
- No Thread.sleep() usage (explicit waits only)
Prerequisites:
- Java 21
- Maven
- Android SDK
- Android Emulator
- Appium Server
Start Appium Server
appiumRun Tests
mvn clean testAppium Inspector was used extensively to:
- Inspect dynamic UI hierarchies
- Identify transient UI containers
- Analyze scroll behavior and overlay components
- Validate locator strategies before implementation
Due to dynamic UI rendering and price components being split into multiple TextView elements in the product detail screen, a fully reliable price extraction from the detail page could not be finalized within the given time frame.
- Price digits are rendered across multiple TextViews
- No unique or stable resource-id available for full price value
- Multiple similar TextViews exist across the page This limitation is documented intentionally to demonstrate real-world mobile UI automation challenges and decision-making.
- Parallel execution is supported via TestNG
- Thread-safe driver management using ThreadLocal
- Each scenario runs with an isolated Appium session
- Project follows clean architecture principles
- No hard waits (
Thread.sleep) are used - Explicit waits and robust locators are preferred
- Known limitations are documented transparently
This module covers API Test Automation using the Karate Framework and is designed to validate RESTful services as part of an end-to-end automation strategy.
The project focuses on functional correctness, data integrity, and CI/CD readiness rather than UI-driven validations.
- Java 17
- Karate DSL
- JUnit 5
- Maven
- Docker
- Jenkins
- RESTful Booker API (public test API)
restful-booker-karate
βββ karate-api
βββ Dockerfile
βββ Jenkinsfile
βββ pom.xml
βββ src
βββ test
βββ java
β βββ com
β βββ booking
β βββ KarateTest.java
βββ resources
βββ features
βββ create-booking.feature
βββ get-booking-by-id.feature
βββ update-booking.feature
βββ partial-update-booking.feature
βββ delete-booking.feature
βββ ping.feature
- Health check (/ping)
- Create booking
- Get booking by ID
- Update booking (PUT)
- Partial update booking (PATCH)
- Delete booking
- Response body & schema validations
- Status code validations
- Dynamic ID handling between scenarios
Each endpoint is tested independently to ensure statelessness and repeatable execution in CI environments.
- API tests are written using Karateβs declarative DSL
- No external test data dependencies
- Assertions cover:
- HTTP status codes
- Response payload structure
- Field-level data validation
- Tests are designed to be idempotent and CI-safe
- Karate generates its own HTML test report
- Reports are located under:
target/karate-reports/karate-summary.html
- The report includes:
- Feature-level and scenario-level results
- Execution duration
- Step-by-step request/response visibility
- Implemented using Jenkins Pipeline
- Pipeline stages:
- Checkout source code
- Build Docker image
- Execute API tests inside Docker container
- Publish Karate HTML report
- Jenkins build result reflects actual test execution status
- Tests are executed inside a Docker container
- Maven dependencies are resolved during image build
- Ensures:
- Environment consistency
- CI/CD portability
- Zero local setup dependency
Prerequisites:
- Java 17+
- Maven
- Docker
Run tests using Maven:
mvn clean testOr using Docker:
docker build -t karate-api-tests .
docker run --rm -v target:/app/target karate-api-tests- API tests are fully CI/CD ready -= Framework is lightweight and highly maintainable
- Clear separation from UI and Mobile automation layers
- Designed to demonstrate real-world API automation practices
- Reporting strategy intentionally differs from UI/Mobile modules to align with Karate best practices
Kerem SarΔ±sen