har-to-k6
postman-to-k6
har-to-k6 | postman-to-k6 | |
---|---|---|
2 | 2 | |
117 | 209 | |
0.9% | 3.3% | |
7.0 | 6.1 | |
about 2 months ago | about 2 months ago | |
JavaScript | JavaScript | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
har-to-k6
-
Using mitmproxy with k6
The next step is already the target conversion of the HAR format file to k6 script. For this we use script provided in Grafana's repository.
-
Load testing is hard, and the tools are not great. But why?
I agree that the popular load testing tools leave plenty to be desired, but have you given k6[1] a try? (Full disclosure: I'm one of the maintainers.)
Tests are written in JavaScript and there's support for HTTP, WebSockets and (unary) gRPC. You can easily script a combination of these protocols to mimic real world traffic.
Furthermore you can record a user flow with a browser extension[2] and convert the generated HAR file to a k6 script[3], which would give you an even closer real world scenario. The conversion is not perfect and depending on the service you might need to manually modify the script, but it would get you 90% of the way there.
[1]: https://github.com/loadimpact/k6
[2]: https://k6.io/docs/test-authoring/recording-a-session/browse...
[3]: https://github.com/loadimpact/har-to-k6
postman-to-k6
-
Hurl 4.0.0
Have you tried https://k6.io/ ? (Full disclosure: I'm one of the maintainers.)
It allows you to write load/performance tests in JS, commit them to your repo, easily automate them in CI, send metrics to several backends, use protocols besides HTTP, with a modern CLI, and many more features.
There's also a Postman-to-k6 converter[1]. The conversion might not be perfect, but it will give you a head start.
Note that the k6 philosophy is for developers to write these tests, similarly to how you write unit/integration tests, and to break the classic QA-dev cycle.
I don't want to steal Hurl's thunder, it does look great, but it's limited in features compared to existing peformance testing tools, and I'd personally rather write tests in a programming language, than in a bespoke text format.
[1]: https://github.com/apideck-libraries/postman-to-k6
- Currently I'm using newman/postman to run my API tests but I'm reaching a ceiling. I'm considering re-writing all of my scripts with pure JS w/ Node.JS and then testing with JMeter. Do you think this is a good approach?
What are some alternatives?
Vegeta - HTTP load testing tool and library. It's over 9000!
k6-examples - Project using K6 and Javascript to create scenarios of Load and Stress Test
tsung - Tsung is a high-performance benchmark framework for various protocols including HTTP, XMPP, LDAP, etc.
Newman - Newman is a command-line collection runner for Postman
shadowreader - Serverless load testing for replaying website traffic. Powered by AWS Lambda.
openapi-to-postman - Plugin for converting OpenAPI 3.0 specs to the Postman Collection (v2) format
postman-to-k6 - Converts Postman collections to k6 script code
restclient.el - HTTP REST client tool for emacs
wayback - A bot for Telegram, Mastodon, Slack, and other messaging platforms archives webpages.
hurl - Hurl, run and test HTTP requests with plain text.
example-github-actions - A example repository using GH Actions to automate performance tests with StormForger
Schemathesis - Supercharge your API testing, catch bugs, and ensure compliance