{"id":19940846,"url":"https://github.com/spectolabs/hoverfly-jrecorder","last_synced_at":"2025-07-11T06:41:20.230Z","repository":{"id":144563314,"uuid":"53131274","full_name":"SpectoLabs/hoverfly-jrecorder","owner":"SpectoLabs","description":"Filter which intercepts http requests and outputs them into a hoverfly json file","archived":false,"fork":false,"pushed_at":"2016-03-07T14:58:34.000Z","size":23,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-25T01:12:35.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpectoLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-03-04T11:35:40.000Z","updated_at":"2016-08-17T23:01:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa29052a-925e-41a8-93aa-fae29fbdb929","html_url":"https://github.com/SpectoLabs/hoverfly-jrecorder","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/SpectoLabs/hoverfly-jrecorder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-jrecorder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-jrecorder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-jrecorder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-jrecorder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpectoLabs","download_url":"https://codeload.github.com/SpectoLabs/hoverfly-jrecorder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpectoLabs%2Fhoverfly-jrecorder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264750217,"owners_count":23658340,"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":[],"created_at":"2024-11-13T00:07:10.964Z","updated_at":"2025-07-11T06:41:20.222Z","avatar_url":"https://github.com/SpectoLabs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n**java-hoverfly-exporter**\n-----------------\n\n\n##Quick start\n\nSimply add the filter to your tests (MockMvc in this example) `hoverflyFilter`:\n\n```java\nprivate static HoverflyFilter hoverflyFilter = new HoverflyFilter(\"www.my-test.com\", \"generated/hoverfly.json\");\n\n@Before\npublic void setUp() {\n    this.mockMvc = webAppContextSetup(webApplicationContext)\n            .addFilter(hoverflyFilter)\n            .build();\n}\n```\n\nThe filter takes the baseUrl which you wish your virtualized version of this service to have, and the directory you want the `.json` file to be output to.  When you run the tests you will get a json output containing the recordings in a format of:\n\n```java\n[{\n\"request\": {\n    \"path\": \"/api/bookings\",\n    \"method\": \"POST\",\n    \"destination\": \"www.my-test.com\",\n    \"query\": null,\n    \"body\": \"\"\n},\n\"response\": {\n    \"status\": 400,\n    \"body\": \"\",\n    \"headers\": {}\n}]\n```\n\nYou can then import the filter into hoverfly, for example using the hoverfly junit rule in your api consumer unit tests.\n\n##Maven\n\n```xml\n\u003cgroupId\u003eio.specto\u003c/groupId\u003e\n\u003cartifactId\u003ehoverfly-jrecorder\u003c/artifactId\u003e\n\u003cversion\u003e0.1.2\u003c/version\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectolabs%2Fhoverfly-jrecorder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspectolabs%2Fhoverfly-jrecorder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspectolabs%2Fhoverfly-jrecorder/lists"}