{"id":13342894,"url":"https://github.com/gpiechnik2/xk6-httpagg","last_synced_at":"2026-01-19T22:11:22.507Z","repository":{"id":57703912,"uuid":"496666218","full_name":"gpiechnik2/xk6-httpagg","owner":"gpiechnik2","description":"k6 extension that allows you to aggregate the results of HTTP requests and view them one by one using a generated .html report. Implemented using xk6.","archived":false,"fork":false,"pushed_at":"2024-06-10T09:39:44.000Z","size":586,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-15T07:31:55.906Z","etag":null,"topics":["aggregate","html","http","k6","k6-extension","results","xk6"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gpiechnik2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-05-26T15:06:32.000Z","updated_at":"2024-11-05T07:24:05.000Z","dependencies_parsed_at":"2024-06-19T13:34:07.612Z","dependency_job_id":"eea3a12e-dca4-4c06-9ff2-78415feeba2c","html_url":"https://github.com/gpiechnik2/xk6-httpagg","commit_stats":null,"previous_names":["gpiechnik2/k6-http-aggregator","gpiechnik2/k6-httpagg"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gpiechnik2/xk6-httpagg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpiechnik2%2Fxk6-httpagg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpiechnik2%2Fxk6-httpagg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpiechnik2%2Fxk6-httpagg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpiechnik2%2Fxk6-httpagg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gpiechnik2","download_url":"https://codeload.github.com/gpiechnik2/xk6-httpagg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gpiechnik2%2Fxk6-httpagg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: 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":["aggregate","html","http","k6","k6-extension","results","xk6"],"created_at":"2024-07-29T19:30:06.706Z","updated_at":"2026-01-19T22:11:22.483Z","avatar_url":"https://github.com/gpiechnik2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xk6-httpagg\n[k6](https://github.com/grafana/k6) extension that allows you to aggregate the results of HTTP requests and view them one by one using a generated `.html` report. Until now it was only possible to analyze them using [WDP (Web Debugging Proxy)](https://k6.io/blog/k6-load-testing-debugging-using-a-web-proxy/). Implemented using the [xk6](https://github.com/grafana/xk6) system.\n\n## Build\n```shell\nxk6 build --with github.com/gpiechnik2/xk6-httpagg@latest\n```\n                                             \n## Example\n```javascript\nimport { check } from 'k6';\nimport http from 'k6/http';\nimport httpagg from 'k6/x/httpagg';\n\n\nexport default function () {\n  const response = http.get('http://httpbin.test.k6.io/endpointThatWillReturn404Error');\n  const status = check(\n    response,\n    {\n      'response code was 200': (res) =\u003e res.status == 200\n    }\n  ); // the status variable will be false because the assertion inside does not match\n\n  httpagg.checkRequest(\n    response,\n    status,\n    {\n        fileName: \"myFilenameWithRequestsAggregated.json\",\n        aggregateLevel: \"onSuccess\" // response with the request above will not be \n        // aggregated because we set the  aggregation level to \"onSuccess\". \n        // The default level is \"onError\", which is when any of the assertions from\n        // the k6 \"check\" function fails and the entire function returns false\n    }\n  );\n\n  // or (without the optional fields)\n  httpagg.checkRequest(response, status); // this request \u0026 response will be aggregated because \n  // we have not set the aggregation level and the default \"onError\" will be used. Additionally, \n  // a file will be created with the default name \"httpagg.json\"\n\n  // or\n  // IMPORTANT: We can use the \"all\" aggregation level to aggregate all requests regardless of \n  // the check result\n  httpagg.checkRequest(response, status, {\n      aggregateLevel: \"all\"\n  });\n}\n\nexport function teardown(data) {\n    httpagg.generateRaport(\"myFilenameWithRequestsAggregated.json\", \"myHtmlReport.html\")\n\n    // or (without the optional fields)\n    httpagg.generateRaport() // the default name of the html report that will be created \n    // is \"httpaggReport.html\". In turn, the name of the request results file that will \n    // be checked is \"httpagg.json\"\n}\n```\n\n## Report view\n\u003cimg src=\"exampleResultsView.png\"\u003e\n\n## Run sample script\n```shell\n./k6 run ./script.js\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpiechnik2%2Fxk6-httpagg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpiechnik2%2Fxk6-httpagg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpiechnik2%2Fxk6-httpagg/lists"}