{"id":23107734,"url":"https://github.com/vmyroslav/api-test-demo","last_synced_at":"2025-04-03T22:44:02.880Z","repository":{"id":268438745,"uuid":"903469994","full_name":"vmyroslav/api-test-demo","owner":"vmyroslav","description":"Hoverfly API testing patterns and examples","archived":false,"fork":false,"pushed_at":"2025-03-04T17:57:13.000Z","size":206,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T18:37:36.919Z","etag":null,"topics":["api-testing","go","hoverfly"],"latest_commit_sha":null,"homepage":"","language":"Go","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/vmyroslav.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":"2024-12-14T17:26:10.000Z","updated_at":"2025-03-04T17:55:16.000Z","dependencies_parsed_at":"2024-12-16T19:43:49.873Z","dependency_job_id":"2c177ecf-56cb-461e-afd3-d0ea8aa445d7","html_url":"https://github.com/vmyroslav/api-test-demo","commit_stats":null,"previous_names":["vmyroslav/api-test-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmyroslav%2Fapi-test-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmyroslav%2Fapi-test-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmyroslav%2Fapi-test-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vmyroslav%2Fapi-test-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vmyroslav","download_url":"https://codeload.github.com/vmyroslav/api-test-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247092373,"owners_count":20882217,"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","go","hoverfly"],"created_at":"2024-12-17T01:15:55.752Z","updated_at":"2025-04-03T22:44:02.863Z","avatar_url":"https://github.com/vmyroslav.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Testing with Hoverfly Demo\n\nThis project demonstrates how to effectively use Hoverfly for API testing in various non-trivial scenarios. It includes examples of capturing, simulating, and managing API interactions using Hoverfly, along with different client generation approaches.\n\n## Features\n\n- Comprehensive Hoverfly integration for API testing\n- Support for multiple testing modes (capture, simulate, spy)\n- Automated test execution in both local and containerized environments\n- Client generation using both oapi-codegen and OpenAPI Generator\n- Custom simulation post-processing capabilities\n- Docker Compose setup for consistent development environment\n- Task-based workflow management using Taskfile\n\n## Prerequisites\n\n- Docker and Docker Compose\n- Go 1.23 or later\n- Task (taskfile) installed (`go install github.com/go-task/task/v3/cmd/task@latest`)\n\n## Project Structure\n\n```\n.\n├── api/                    # API specifications\n├── client/                # Generated API clients\n│   ├── oapi/             # oapi-codegen generated client\n│   └── openapi/          # OpenAPI Generator client\n├── docker/               # Dockerfile definitions\n├── testdata/            # Test data and Hoverfly simulations\n│   └── hoverfly/        # Hoverfly simulation files\n├── tools/               # Project tools\n│   └── postprocessor/   # Simulation post-processor\n├── docker-compose.yml   # Docker services configuration\n└── Taskfile.yml        # Task definitions\n```\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/vmyroslav/api-test-demo.git\ncd api-test-demo\n```\n\n2. Build the containers:\n```bash\ntask build:container\n```\n\n## Testing Modes\n\n### Local Testing\n\nRun tests on your local machine:\n\n```bash\n# Run tests against real API\ntask test:local\n\n# Run tests with Hoverfly capture mode\ntask test:local:capture\n\n# Run tests with Hoverfly simulate mode\ntask test:local:simulate\n```\n\n## Post-processing Simulations\n\nThe project includes a custom post-processor for Hoverfly simulations. To process a simulation:\n\n```bash\ntask hoverfly:process-simulation SIMULATION_FILE=\u003cpath\u003e PROCESSOR=default\n```\n\nAvailable processors:\n- `default`: Standard simulation processor\n- `null`: No-op processor\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\n[Add your license information here]\n\n## Acknowledgments\n\n- [Hoverfly](https://hoverfly.io/) - API virtualization tool\n- [oapi-codegen](https://github.com/deepmap/oapi-codegen) - OpenAPI client generator for Go\n- [OpenAPI Generator](https://openapi-generator.tech/) - OpenAPI client generator","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmyroslav%2Fapi-test-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvmyroslav%2Fapi-test-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvmyroslav%2Fapi-test-demo/lists"}