{"id":49531634,"url":"https://github.com/algorandfoundation/algokit-polytest","last_synced_at":"2026-05-02T08:11:44.571Z","repository":{"id":322307654,"uuid":"1088938655","full_name":"algorandfoundation/algokit-polytest","owner":"algorandfoundation","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-19T18:08:37.000Z","size":14389,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T19:28:37.303Z","etag":null,"topics":["algokit","utils"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/algorandfoundation.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":".github/CODEOWNERS.md","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-03T16:59:58.000Z","updated_at":"2026-01-20T22:18:05.000Z","dependencies_parsed_at":"2025-12-16T00:09:56.771Z","dependency_job_id":null,"html_url":"https://github.com/algorandfoundation/algokit-polytest","commit_stats":null,"previous_names":["joe-p/algokit-polytest","algorandfoundation/algokit-polytest"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/algorandfoundation/algokit-polytest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-polytest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-polytest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-polytest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-polytest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/algorandfoundation","download_url":"https://codeload.github.com/algorandfoundation/algokit-polytest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/algorandfoundation%2Falgokit-polytest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32527190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["algokit","utils"],"created_at":"2026-05-02T08:11:43.741Z","updated_at":"2026-05-02T08:11:44.558Z","avatar_url":"https://github.com/algorandfoundation.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AlgoKit Polytest\n\nTest configuration files and mock server infrastructure for cross-language testing of AlgoKit libraries.\n\n## Overview\n\nThis repository provides:\n\n- **Test Configurations** (`test_configs/`) - Shared test plans for polytest CLI, ensuring consistent test coverage across Python, TypeScript, and other language implementations\n- **Mock Server** (`resources/mock-server/`) - Bun-based HTTP server that replays pre-recorded HAR files for deterministic API testing\n- **GitHub Actions** (`.github/actions/`) - Reusable composite actions for CI integration\n\n## Directory Structure\n\n```\n├── .github/\n│   └── actions/\n│       ├── setup-polytest/     # Install polytest CLI\n│       └── run-mock-server/    # Start mock server for testing\n├── resources/\n│   └── mock-server/            # Bun/Fastify mock server\n│       ├── recordings/         # HAR files for algod, indexer, kmd\n│       └── src/                # Server implementation\n├── test_configs/               # Polytest configuration files\n│   ├── algod_client.jsonc\n│   ├── indexer_client.jsonc\n│   ├── kmd_client.jsonc\n│   └── transact.jsonc\n└── docs/                       # Generated test plan documentation\n```\n\n## GitHub Actions\n\n### `setup-polytest`\n\nInstalls Rust toolchain and the polytest CLI.\n\n```yaml\n- uses: algorandfoundation/algokit-polytest/.github/actions/setup-polytest@main\n  with:\n    version: \"0.6.0\"  # Optional: pin to specific version\n```\n\n### `run-mock-server`\n\nStarts a mock server for testing Algorand API clients.\n\n```yaml\n- uses: algorandfoundation/algokit-polytest/.github/actions/run-mock-server@main\n  with:\n    client: algod  # Required: algod, indexer, or kmd\n\n# After this step, MOCK_ALGOD_URL, MOCK_INDEXER_URL, MOCK_KMD_URL is available (e.g., http://localhost:8000)\n```\n\nSee [run-mock-server README](.github/actions/run-mock-server/README.md) for full documentation.\n\n## Local Development\n\n### Prerequisites\n\n- [Bun](https://bun.sh/) runtime: `curl -fsSL https://bun.sh/install | bash`\n\n### Running the Mock Server\n\n**Start all servers (recommended):**\n\n```bash\ncd resources/mock-server\n./scripts/start_all_servers.sh\n```\n\nThis starts algod (port 8000), kmd (port 8001), and indexer (port 8002) in the background and outputs the environment variables to set.\n\n**Start a single server:**\n\n```bash\ncd resources/mock-server\n./scripts/start_server.sh algod     # Port 8000\n./scripts/start_server.sh kmd       # Port 8001\n./scripts/start_server.sh indexer   # Port 8002\n```\n\n**Stop all servers:**\n\n```bash\ncd resources/mock-server\n./scripts/stop_all_servers.sh\n```\n\nSee [mock-server README](resources/mock-server/README.md) for more details.\n\n### Recording New HAR Files\n\nEdit `resources/mock-server/src/record.ts` to add new requests, then restart the server. It will record any missing requests to the HAR files.\n\n## Integration with Implementation Repos\n\nImplementation repositories (e.g., `algokit-utils-py`, `algokit-utils-ts`) use this repo via:\n\n1. **Test Generation**: polytest CLI with `--git` flag pulls configs from this repo\n2. **Mock Server**: GitHub Action starts the mock server in CI","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgokit-polytest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falgorandfoundation%2Falgokit-polytest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falgorandfoundation%2Falgokit-polytest/lists"}