{"id":29151094,"url":"https://github.com/cihat-kose/restassured-practice-lessons","last_synced_at":"2025-07-01T00:06:36.897Z","repository":{"id":159141903,"uuid":"634470313","full_name":"cihat-kose/restassured-practice-lessons","owner":"cihat-kose","description":"This project serves as an educational API testing framework for learning Rest Assured, TestNG, and JavaFaker. Designed to teach API automation testing fundamentals through practical examples and hands-on exercises.","archived":false,"fork":false,"pushed_at":"2025-06-08T00:03:36.000Z","size":610,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-21T14:32:48.647Z","etag":null,"topics":["api-testing","automation","java","java-rest-api","quality-assurance","restassured-framework","restful-api","testng"],"latest_commit_sha":null,"homepage":"https://petstore.swagger.io/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cihat-kose.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-30T08:18:43.000Z","updated_at":"2025-06-08T00:03:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ca62bbb-bc23-40a9-a48d-d1c7d6338a7f","html_url":"https://github.com/cihat-kose/restassured-practice-lessons","commit_stats":null,"previous_names":["cihat-kose/testingpractices_restassured_api","cihat-kose/restassured-api-test-lab","cihat-kose/restassured-practice-lessons"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cihat-kose/restassured-practice-lessons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Frestassured-practice-lessons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Frestassured-practice-lessons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Frestassured-practice-lessons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Frestassured-practice-lessons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cihat-kose","download_url":"https://codeload.github.com/cihat-kose/restassured-practice-lessons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cihat-kose%2Frestassured-practice-lessons/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262870872,"owners_count":23377312,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-testing","automation","java","java-rest-api","quality-assurance","restassured-framework","restful-api","testng"],"created_at":"2025-07-01T00:06:36.230Z","updated_at":"2025-07-01T00:06:36.869Z","avatar_url":"https://github.com/cihat-kose.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Rest Assured Practice Lessons\n\n![RestAssured](https://img.shields.io/badge/RestAssured-5.x-brightgreen?style=for-the-badge\u0026logo=java)\n![Cucumber](https://img.shields.io/badge/Cucumber-23D96C?style=for-the-badge\u0026logo=cucumber\u0026logoColor=white)\n![TestNG](https://img.shields.io/badge/TestNG-7.x-orange?style=for-the-badge)\n![Java](https://img.shields.io/badge/Java-17%2B-blue?style=for-the-badge\u0026logo=openjdk)\n![Jenkins](https://img.shields.io/badge/Jenkins-CI%2FCD-critical?style=for-the-badge\u0026logo=jenkins)\n![Hamcrest](https://img.shields.io/badge/Hamcrest-assertions-purple?style=for-the-badge)\n![Jackson](https://img.shields.io/badge/Jackson-JSON--binding-ff9933?style=for-the-badge)\n![Maven](https://img.shields.io/badge/Maven-C71A36?style=for-the-badge\u0026logo=apache-maven\u0026logoColor=white)\n\n## Table of Contents\n\n1. [About the Project](#about-the-project)\n2. [Features](#features)\n3. [Installation](#installation)\n4. [Configuration](#configuration)\n5. [Usage](#usage)\n6. [Folder Structure](#folder-structure)\n7. [Dependencies](#dependencies)\n8. [Reporting](#reporting)\n9. [Contributing](#contributing)\n10. [License](#license)\n\n## About the Project\n\nThe **Rest Assured Practice Lessons** framework is an API testing solution for the Petstore API, utilizing RestAssured for API interactions, Cucumber for BDD (Behavior-Driven Development), and TestNG for test execution. This framework tests essential API functionalities, such as adding, updating, retrieving, and deleting pets.\n\n## Features\n\n- **API Testing with RestAssured**: Provides methods for `GET`, `POST`, `PUT`, and `DELETE` requests.\n- **Behavior-Driven Development**: Uses Cucumber with Gherkin syntax to define scenarios in a human-readable format.\n- **Detailed Reporting**: Generates HTML and PDF reports using ExtentReports for comprehensive test results.\n- **Test Automation**: Tests include critical API functionality for the Petstore, including adding new pets, updating pet info, and verifying responses.\n\n### Scenarios Covered\n- **Get Pet by ID**: Retrieves pet information by ID and checks for a 200 response.\n- **Add New Pet**: Adds a new pet to the store and verifies the response data.\n- **Update Pet Info**: Updates existing pet details, confirming the status change.\n- **Delete Pet by ID**: Deletes a pet by ID and validates the deletion response.\n\n## Installation\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/cihat-kose/restassured-practice-lessons.git\n   ```\n2. **Open the project in IntelliJ IDEA**:\n   - Go to **File \u003e Open** and select the project folder.\n   - Ensure the project is imported as a Maven project.\n3. **Install Plugins** (optional for IntelliJ IDEA):\n   - **Cucumber for Java** and **Gherkin** plugins for Cucumber syntax support.\n   - Go to **File \u003e Settings \u003e Plugins** and search for the plugins to install.\n\n## Configuration\n\nOnly `extent.properties` is required for configuring ExtentReports. It is located in `src/test/resources`.\n\n```properties\nextent.reporter.spark.start=true\nextent.reporter.spark.out=test-output/SparkReport/Spark.html\nextent.reporter.pdf.start=true\nextent.reporter.pdf.out=PdfReport.pdf\n```\n\n## Usage\n\n1. **Run Tests**:\n   - To run tests with TestNG, right-click on `TestRunnerExtentReport` in the `runners` package and select **Run**.\n   - Alternatively, use Maven from the command line:\n     ```bash\n     mvn clean test\n     ```\n   - The tests send real HTTP requests to the public Petstore API, so an active internet connection is required.\n\n2. **Generate Reports**:\n   - Test results are generated in HTML (`test-output/SparkReport/Spark.html`) and PDF (`PdfReport.pdf`) formats.\n\n## Folder Structure\n\n```plaintext\nrestassured-practice-lessons/\n│\n├── src/\n│   └── test/\n│       ├── java/\n│       │   ├── features/             # Cucumber feature files\n│       │   │   └── PetstoreAPITests.feature\n│       │   ├── pages/                # API interaction classes\n│       │   │   └── APIPage.java\n│       │   ├── runners/              # TestNG runner classes\n│       │   │   └── TestRunnerExtentReport.java\n│       │   └── stepDefinitions/      # Step definitions for Cucumber\n│       │       └── PetstoreAPISteps.java\n│       └── resources/\n│           ├── extent.properties     # ExtentReports configuration\n│           ├── postman/              # Postman collection for API tests\n│           │   └── Petstore API Test.postman_collection.json\n│           └── testng.xml            # TestNG suite configuration\n├── target/                           # Build output\n└── pom.xml                           # Maven configuration file\n```\n\n## Dependencies\n\nDependencies are managed in the `pom.xml` file. Key dependencies include:\n\n- **RestAssured**: For making HTTP requests to test the API.\n- **Cucumber Java \u0026 TestNG**: Cucumber for BDD and TestNG for managing test execution.\n- **ExtentReports**: For generating detailed HTML and PDF reports.\n- **SLF4J**: Simple Logging Facade for Java, used for logging during testing.\n\n\u003e ⚠️ **Java Version Requirement**:\n\u003e This project uses Java 17 features such as *Text Blocks* (`\"\"\"`) and `.formatted()` method.\n\u003e Please ensure your environment uses **Java 17 or higher**.\n\n## Reporting\n\nTest reports are stored in `test-output` and `testReports` directories. Reports generated include:\n\n- **HTML Report**: Located at `test-output/SparkReport/Spark.html`.\n- **PDF Report**: Available at `PdfReport.pdf`.\n\nThese reports include test results, system information, and details of each test scenario.\n\n## Contributing\n\nContributions are welcome! To contribute:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-branch`).\n3. Commit your changes (`git commit -m 'Add new feature'`).\n4. Push to the branch (`git push origin feature-branch`).\n5. Open a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Frestassured-practice-lessons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcihat-kose%2Frestassured-practice-lessons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcihat-kose%2Frestassured-practice-lessons/lists"}