{"id":26584131,"url":"https://github.com/chrispsheehan/performance-test-framework","last_synced_at":"2026-03-08T08:33:50.761Z","repository":{"id":41531583,"uuid":"353360247","full_name":"chrispsheehan/performance-test-framework","owner":"chrispsheehan","description":"Run performance tests against an API using k6.","archived":false,"fork":false,"pushed_at":"2023-10-16T13:14:14.000Z","size":353,"stargazers_count":10,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2023-10-17T02:58:20.431Z","etag":null,"topics":["docker","k6","performance-testing","test-automation","typescript"],"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/chrispsheehan.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}},"created_at":"2021-03-31T13:07:01.000Z","updated_at":"2023-09-10T11:53:55.000Z","dependencies_parsed_at":"2023-02-17T08:18:22.649Z","dependency_job_id":null,"html_url":"https://github.com/chrispsheehan/performance-test-framework","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fperformance-test-framework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fperformance-test-framework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fperformance-test-framework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrispsheehan%2Fperformance-test-framework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrispsheehan","download_url":"https://codeload.github.com/chrispsheehan/performance-test-framework/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245078850,"owners_count":20557368,"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":["docker","k6","performance-testing","test-automation","typescript"],"created_at":"2025-03-23T09:19:05.998Z","updated_at":"2026-03-08T08:33:50.696Z","avatar_url":"https://github.com/chrispsheehan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PerformanceTestFramework\n\nThese example tests are currently pointed at the [MockApp](MockApp), which is hosted in Docker.\n\nTo target another URI remove the ``mock`` service and set the ``APP_DOMAIN`` environmental variable within the [docker-compose](docker-compose.yaml) file.\n\nReferences:\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [k6](https://k6.io/)\n- [Example](https://github.com/go-automate/k6-typescript-framework)\n- [Using node modules i.e. faker](https://github.com/k6io/template-es6)\n- [Mock api repository](https://github.com/chrispsheehan/simple-mock)\n\n## Build code in docker\n\n```bash\ndocker run -i --rm -v ${PWD}/:/app node:16.5-alpine npm run build --prefix /app\n```\n\n## Run in docker-compose\n\n- The below command will;\n  - Start a target mock api\n  - Execute the tests via k6\n\n```bash\ndocker-compose run --rm k6-runner \u0026\u0026 docker-compose stop\n```\n\n## Tags\n\nTags are used to separate results from one another as documented [here](https://k6.io/docs/using-k6/tags-and-groups/#tags).\n\n```ts\nheaders.tags = { tag: \"getuser\" };\n```\n\n## Thresholds\n\nThresholds are set on a per tag basis as documented [here](https://k6.io/docs/using-k6/thresholds/#thresholds-on-tags).\n\n- **p(95)\u003c2000** 95% of requests to run in 5 seconds or less.\n- **rate\u003c=0.01** 99% of requests successful.\n\n```ts\nexport let options = {\n  \n  thresholds: {\n    \"http_req_duration{tag:getuser}\": ['p(95)\u003c10000'],\n    \"http_req_failed{tag:getuser}\": ['rate\u003c=0.01'],\n\n    \"http_req_duration{tag:createuser}\": ['p(95)\u003c2000'],\n    \"http_req_failed{tag:createuser}\": ['rate\u003c=0.01'],    \n  },\n};\n```\n\n## Gotchas\n\n- ERROR: `no matching manifest for linux/arm64/v8 in the manifest list entries`\n- FIX: add `platform: linux/x86_64` to docker-compose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrispsheehan%2Fperformance-test-framework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrispsheehan%2Fperformance-test-framework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrispsheehan%2Fperformance-test-framework/lists"}