{"id":20128046,"url":"https://github.com/osandadeshan/rest-assured-java-api-automation-demo","last_synced_at":"2025-07-30T01:07:25.187Z","repository":{"id":189840644,"uuid":"681143636","full_name":"osandadeshan/rest-assured-java-api-automation-demo","owner":"osandadeshan","description":"This project serves as a boilerplate for automating REST APIs across various environments using TestNG and the Rest Assured library.","archived":false,"fork":false,"pushed_at":"2024-09-17T03:12:16.000Z","size":38,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-09-17T09:11:00.592Z","etag":null,"topics":["api-automation","backend-automation","java","rest-api","rest-api-automation","rest-assured","testng"],"latest_commit_sha":null,"homepage":"","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/osandadeshan.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}},"created_at":"2023-08-21T11:12:19.000Z","updated_at":"2024-09-17T03:12:19.000Z","dependencies_parsed_at":"2023-08-22T02:49:14.558Z","dependency_job_id":null,"html_url":"https://github.com/osandadeshan/rest-assured-java-api-automation-demo","commit_stats":null,"previous_names":["osandadeshan/rest-assured-java-api-automation-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osandadeshan%2Frest-assured-java-api-automation-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osandadeshan%2Frest-assured-java-api-automation-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osandadeshan%2Frest-assured-java-api-automation-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osandadeshan%2Frest-assured-java-api-automation-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osandadeshan","download_url":"https://codeload.github.com/osandadeshan/rest-assured-java-api-automation-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224519227,"owners_count":17324764,"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-automation","backend-automation","java","rest-api","rest-api-automation","rest-assured","testng"],"created_at":"2024-11-13T20:25:09.883Z","updated_at":"2024-11-13T20:25:10.540Z","avatar_url":"https://github.com/osandadeshan.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Automation Using Rest Assured \u0026 TestNG\n\nThis project provides a template for automating REST API testing across multiple environments using TestNG and the Rest Assured library.\n\n[![Rest Assured Java API Automation CI](https://github.com/osandadeshan/rest-assured-java-api-automation-demo/actions/workflows/rest-assured-java-ci.yml/badge.svg?branch=master)](https://github.com/osandadeshan/rest-assured-java-api-automation-demo/actions/workflows/rest-assured-java-ci.yml)\n\n## Prerequisites\n1. Java\n2. Maven\n3. IntelliJ IDEA\n\n## Project structure\n\n```\n.github/                                              # GitHub workflow configurations\nlogs/                                                 # Log4j log files\nreports/                                              # Extent HTML report files\nsrc/\n├── main/\n│   ├── java/\n│   │   └── com/\n│   │       └── restassured/\n│   │           └── example/\n│   │               ├── Category.java\n│   │               ├── HttpMethod.java\n│   │               ├── constant/                     # Project related constants including Application and Reporter contants\n│   │               │   ├── ApplicationConstant.java\n│   │               │   ├── AuthenticationConstant.java\n│   │               │   ├── CommonConstant.java\n│   │               │   └── ReporterConstant.java\n│   │               ├── model/                        # Model classes which represents the request JSON payload\n│   │               │   ├── AuthenticationRequest.java\n│   │               │   ├── BookingDates.java\n│   │               │   ├── BookingRequest.java\n│   │               ├── service/\n│   │               │   ├── ExtentReportService.java  # Extent report setup services\n│   │               │   └── app/                      # Application service classes\n│   │               │       ├── AuthenticationService.java\n│   │               │       └── BookingService.java\n│   │               └── util/                         # Utility methods\n│   │                   ├── AnnotationReader.java\n│   │                   └── FileReader.java\n│   │                   └── JsonFormatter.java\n│   │                   └── Log4jFilter.java\n│   │                   └── RestClient.java\n│   │                   └── TestListener.java\n│   └── resources/                                    # Resource files for logging and reporting\n│       ├── log4j2.xml\n│       └── test-reporter.properties\n├── test/\n│   ├── java/\n│   │   └── com/\n│   │       └── restassured/\n│   │           └── example/\n│   │               └── test/\n│   │                   ├── constant/                     # Test constants\n│   │                   │   └── TestCategory.java\n│   │                   ├── AuthTest.java                 # Authentication tests\n│   │                   ├── BaseTest.java                 # Base test class setup\n│   │                   ├── CreateBookingTest.java        # API test for creating a booking\n│   │                   ├── DeleteBookingTest.java        # API test for deleting a booking\n│   │                   ├── GetAllBookingsTest.java       # API test for fetching all bookings\n│   │                   └── UpdateBookingTest.java        # API test for updating a booking\n│   └── resources/\n│       └── env/                                          # Environment configurations\n│           ├── dev.properties\n│           ├── pre-prod.properties\n│           ├── prod.properties\n│           ├── qa.properties\n│           └── uat.properties\n│       └── regression-suite.xml                          # TestNG regression test suite configuration\n│       └── smoke-suite.xml                               # TestNG smoke test suite configuration\ntarget/                                                   # Compiled code and build artifacts are stored here\n.gitignore                                                # Specifies files and directories to be ignored by Git\nLICENSE                                                   # License information for the project\npom.xml                                                   # Maven configuration file for dependencies and build settings\nREADME.md                                                 # Repository overview and instructions (This file)\n```\n\n## ⚠️ Important: Steps to update the APIs\n* Go to `com.restassured.example.util.RestClient`\n* **Uncomment line 131** to enable your actual API functionality.\n* Remove the **\"TODO: \"** comment, as it is no longer relevant\n\n## How to run tests\n1. Using IntelliJ IDEA\n    * Go to Maven Profiles\n    * Select `dev`, `qa`, `uat`, `pre-prod` or `prod` Maven Profile as the environment\n    * Select the test classes on the `src/test/java` folder\n    * Right-click and click on `Run`\n\n\n2. Using Command Line\n    * To run the smoke test suite against the UAT environment\n\n      `mvn clean test -Puat,smoke-test`\n\n    * To run the regression test suite against the QA environment\n\n      `mvn clean test -Pqa,regression-test`\n\n**Note**: By default, if no Maven profiles are selected, the tests will be executed on the `dev` environment.\n\n## License\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/0/0b/License_icon-mit-2.svg/2000px-License_icon-mit-2.svg.png\" alt=\"MIT License\" width=\"100\" height=\"100\"/\u003e [MIT License](https://opensource.org/licenses/MIT)\n\n## Copyright\nCopyright 2024 [MaxSoft](https://maxsoftlk.github.io/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosandadeshan%2Frest-assured-java-api-automation-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosandadeshan%2Frest-assured-java-api-automation-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosandadeshan%2Frest-assured-java-api-automation-demo/lists"}