{"id":21509108,"url":"https://github.com/tooniez/restassured-maven-java","last_synced_at":"2026-03-05T01:30:57.404Z","repository":{"id":211654517,"uuid":"729376665","full_name":"tooniez/restassured-maven-java","owner":"tooniez","description":"💨 Maven project using RestAssured and JUnit to chain OpenWeatherAPI for Air Quality testing","archived":false,"fork":false,"pushed_at":"2025-08-18T14:55:35.000Z","size":106,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-22T23:01:03.613Z","etag":null,"topics":["apitesting","climate","dotenv","hamcrest","junit","maven","restassured","surefire","surefire-plugin"],"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/tooniez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/SUPPORT.md","governance":".github/GOVERNANCE.md","roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["tooniez"]}},"created_at":"2023-12-09T03:31:06.000Z","updated_at":"2025-05-26T13:20:19.000Z","dependencies_parsed_at":"2023-12-10T04:26:26.184Z","dependency_job_id":"a42ccfd1-6060-4f38-aac1-d62aff5daca6","html_url":"https://github.com/tooniez/restassured-maven-java","commit_stats":{"total_commits":53,"total_committers":2,"mean_commits":26.5,"dds":"0.16981132075471694","last_synced_commit":"7c4a92745d4eba928cb1190d2f11df3ef55d019c"},"previous_names":["tooniez/mav-resty","tooniez/restassured-maven-java"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tooniez/restassured-maven-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Frestassured-maven-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Frestassured-maven-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Frestassured-maven-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Frestassured-maven-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tooniez","download_url":"https://codeload.github.com/tooniez/restassured-maven-java/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Frestassured-maven-java/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30104261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:06:53.091Z","status":"ssl_error","status_checked_at":"2026-03-05T01:02:35.679Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["apitesting","climate","dotenv","hamcrest","junit","maven","restassured","surefire","surefire-plugin"],"created_at":"2024-11-23T21:18:26.266Z","updated_at":"2026-03-05T01:30:57.375Z","avatar_url":"https://github.com/tooniez.png","language":"Java","funding_links":["https://github.com/sponsors/tooniez"],"categories":[],"sub_categories":[],"readme":"# RestAssured Maven Java Repo\n\n[![ci runs](https://github.com/tooniez/restassured-maven-java/actions/workflows/ci.yml/badge.svg)](https://github.com/tooniez/restassured-maven-java/actions/workflows/ci.yml)\n\nThis is a Maven project that utilizes RestAssured and JUnit to evaluate how to achieve some tasks in `./.idea/notes.md` \n\nThe final test script that demonstrates the tasks is in - `./src/test/java/TestAirQuality.java`\n\n\n## Prerequisites\n\nBefore running this project, make sure you have the following installed:\n\n- Java Development Kit (JDK)\n- Apache Maven\n\n## Installation\n\n1. Clone this repository to your locally.\n2. Add Open Weather API key into `.env`\n2. Install/Test the project using the Makefile: `make install`.\n\n\n## Data Providers\n\nThe `/src/test/java/providers/CityProvider.java` returns a list of cities used.\n\n```java\n    public static List\u003cString\u003e getCities() {\n        return Arrays.asList(\"Melbourne\", \"Manchester\");\n    }\n```\n\n## Endpoints\n\nThe `/src/test/java/weather/Endpoints.java` contains 2 endpoints used in this exercise. The `Endpoints` extends from `Base.java` where we store the base url domain and versioning.\n\n```java\n    public static String getWeatherEndpoint(String city, String apiKey) {\n        return \"/weather?q=\" + city + \"\u0026appid=\" + apiKey;\n    }\n\n    public static String getAirPollutionEndpoint(double lat, double lon, String apiKey) {\n        return \"/air_pollution/forecast?lat=\" + lat + \"\u0026lon=\" + lon + \"\u0026appid=\" + apiKey;\n    }\n```\n\n## Tests\n\n### Test config\n\nA `./src/test/java/BaseTest.java` class should be used to extend on all tests. Currently its configured to load api_key stored in `.env` file using a `@BeforeClass` decorator.\n\n```\n    protected static Dotenv dotenv;\n    protected static String API_KEY;\n```\n\n### Test Cases\n\nThe `./src/test/java/TestLatlon.java` is a simple test script used to explore openweather api and see the shape of data it returns.\n\nThe `./src/test/java/TestAirQuality.java` contains flow where it:\n1. Uses weatherEndpoint to get lat lon response for each city\n2. Uses airPollutionEndpoint to get air quality (agi) using lat lon\n3. Checks to see if the captured agi is greater or equal to the threshold we check for (2)\n\n```shell\n[INFO] Running TestAirQuality\nCoordinates for Melbourne: 28.0836, -80.6081\nAQI for Melbourne: 2\nCity with AQI 2 or above: Melbourne, AQI: 2\nCoordinates for Manchester: 53.4809, -2.2374\nAQI for Manchester: 1\nCity with AQI below 2: Manchester, AQI: 1\n[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.494 s -- in TestAirQuality\n```\n\n### Test Reporting\n\nThe project is currently configured to use junit with the `surefire` plugin to save the xml report. Reports are stored under `./reports`\n\nA CI workflow is also configured in this project for reporting/triggers\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftooniez%2Frestassured-maven-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftooniez%2Frestassured-maven-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftooniez%2Frestassured-maven-java/lists"}