{"id":19229967,"url":"https://github.com/dimosr/acceptance-testing-demo","last_synced_at":"2026-05-17T09:33:52.006Z","repository":{"id":78427315,"uuid":"197645383","full_name":"dimosr/acceptance-testing-demo","owner":"dimosr","description":"A project demonstrating acceptance testing with Spring","archived":false,"fork":false,"pushed_at":"2019-07-21T09:56:19.000Z","size":145,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-14T05:17:24.487Z","etag":null,"topics":["acceptance-testing","microservices","spring-boot","testing"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimosr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-07-18T19:29:36.000Z","updated_at":"2020-05-31T15:34:38.000Z","dependencies_parsed_at":"2023-04-11T10:30:51.502Z","dependency_job_id":null,"html_url":"https://github.com/dimosr/acceptance-testing-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dimosr/acceptance-testing-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimosr%2Facceptance-testing-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimosr%2Facceptance-testing-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimosr%2Facceptance-testing-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimosr%2Facceptance-testing-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimosr","download_url":"https://codeload.github.com/dimosr/acceptance-testing-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimosr%2Facceptance-testing-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33133640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["acceptance-testing","microservices","spring-boot","testing"],"created_at":"2024-11-09T15:36:16.946Z","updated_at":"2026-05-17T09:33:51.970Z","avatar_url":"https://github.com/dimosr.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Project purpose\nThe purpose of this project is to demonstrate how one \ncan create a suite of acceptance tests in a microservice environment that:\n* are lightweight\n* can evolve with minimal code changes as more components are added to the service under test\n* are not dependent on prior setups from the dependent services\n\nThe main idea and the motivation behind it can be found [in this blog post](https://dimosr.github.io/acceptance-tests-with-spring/).\n\n## Problem and architecture\n\nFor the purpose of demonstration, the project contains a slightly contrived solution \nto the problem of building an online taxi service.\n\nThe overall environment consists of 4 services:\n* the **taxi offer service**, which is the main service that's \nresponsible for retrieving the trip details and the customer data \nand returning offers.\n* the **drivers discovery service**, which is a dependent service that's\nresponsible for returning all the drivers available near a location.\n* the **driver preferences service**, which is a dependent service that's\nresponsible for returning the preferences of the provided drivers with regards\nto prices and customer ratings.\n* the **customer rating service**, which is a dependent service that's\nresponsible for returning the rating of the provided customer.\n* the **trip pricing service**, which is a dependent service that's\nresponsible for calculating the price of a trip between 2 locations.\n\n![architecture diagram](img/architecture-diagram.png)\n\nIn this case, the SUT (system-under-test) is the *taxi offer service* and\nthe rest are services the SUT depends on.\n\n## Project structure\n\nThe project is structured as a multi-project gradle project.\nYou can see that each service consists of 2 gradle sub-projects:\n* one project for the code of the service itself, i.e. *customer-rating-service*\n* another project that contains the code of the model classes that are used for communicating with this service, i.e. *customer-rating-service-model*\n\nIn practice, each one of these projects could reside in separate repos. \nHere, they all reside in a single repo for the convenience of the demo.\n\nThe services are developed using Spring Boot and Jackson as the serialisation protocol for inter-service communication with requests being exchanged over HTTP.\n\n## Running the services\nFollowing the instructions below, you can run all the services and execute some requests:\n* Start the *drivers discovery service* (port 8090)\n```\n./gradlew :drivers-discovery-service:bootRun\n```\n* Start the *customer rating service* (port 8091)\n```\n./gradlew :customer-rating-service:bootRun\n```\n* Start the *trip pricing service* (port 8092)\n```\n./gradlew :trip-pricing-service:bootRun\n```\n* Start the *driver preferences service* (port 8093)\n```\n./gradlew :driver-preference-service:bootRun\n```\n* Start the *taxi offer service* (port 8080)\n```\n./gradlew :taxi-offer-service:bootRun\n```\n* Now that all service are running, you can send a request to the taxi offer service,\nby executing a POST request at `http://localhost:8080/taxi-offers` with a body of the following type:\n```json\n{\n\t\"trip\": {\n\t\t\"start\": {\n\t\t\t\"latitude\": 34.43,\n\t\t\t\"longitude\": 52.12\n\t\t},\n\t\t\"end\": {\n\t\t\t\"latitude\": 31.53,\n\t\t\t\"longitude\": 50.72\n\t\t}\n\t},\n\t\"customerId\": \"2175a8ce-ebac-4b4e-ba2b-53ae4e28b589\"\n}\n```\n\n## Running the tests\nYou can also run the acceptance tests executing the following command:\n```\n./gradlew :taxi-offer-service:test\n```\nThese tests are creating stub instances of the dependent services and \nsetting up stub responses using the data available under `taxi-offer-service/src/test/resources/dependencies/`.\nThen, they are reading the directories under `taxi-offer-service/src/test/resources/requests/`\nand they using the data there to run requests against the SUT and verify against the expected responses.\n\nThe main code for the acceptance tests framework is in the packages under `taxi-offer-service/src/test/java/taxi/offer`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimosr%2Facceptance-testing-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimosr%2Facceptance-testing-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimosr%2Facceptance-testing-demo/lists"}