Skip to content

KobaAbzianidze/qa-automation-api-singular

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Register Endpoint API Automation Tests

Overview

This project contains automated API tests for the /register endpoint of a mock user registration service. The tests are written in Java using Cucumber for BDD-style feature files and RestAssured for HTTP request handling. The goal is to verify the correctness of the endpoint for various positive, negative, and edge test scenarios according to the specified requirements.

Project Structure

ProjectRoot/
│
├── src/
│   ├── main/
│   │   └── java/
│   │       └── utils/                # Utility classes like ConfigReader
│   │
│   └── test/
│       ├── java/
│       │   ├── runner/              # Test runner class (e.g., CucumberTestRunner.java)
│       │   ├── stepdefinitions/     # Step definitions using RestAssured
│       │   └── hook/                # Cucumber hooks for setup/teardown
│       │
│       └── resources/
│           └── features/            # Cucumber feature files in Gherkin
│
├── pom.xml                          # Maven project configuration
├── README.md                        # Project documentation
└── target/
    └── cucumber-report.html         # HTML report generated post-test execution

Make sure you have installed

  • Java(Project uses JDK 21 as latest LTS version)
  • Maven - build tool

How to Run

To compile and run all tests:

mvn clean test

Test Reports

Test reports are generated at target/cucumber-report.html. Open this file in your browser to review detailed test results.


Testing Strategy

  • Test scenarios are written in Gherkin syntax using Cucumber to clearly describe behavior and expected outcomes.
  • Tests cover all critical cases: successful registration, missing parameters, validation errors, and wrong HTTP methods.
  • RestAssured is used to send HTTP requests and validate API responses including status codes and response payloads.
  • Cucumber hooks configure base URL and setup common test context.
  • The tests are modular and reusable, with step definitions separated from feature files.

Possible Improvements

  • Logging: Add logging for requests and responses (e.g., SLF4J, Log4j) to improve debugging and traceability.
  • CI/CD Integration: Configure pipeline (GitHub Actions, Jenkins, GitLab CI) to run tests automatically on every commit or pull request.
  • Parameterization: Externalize base URLs and test data to support multiple environments without code changes.
  • Enhanced Reporting: Use more detailed reporting plugins or tools (e.g., Allure Reports) for richer test results and history tracking.
  • Parallel Test Execution: Enable parallel execution in Maven or Cucumber to speed up test runs.
  • Retry and Flaky Test Handling: Implement retry logic or flakiness detection to increase reliability.
  • Expand Test Coverage: Add tests for other endpoints or integrate end-to-end workflows.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors