Load testing a .NET API with k6 and GitHub Actions
Introduction That an API responds well to a user does not guarantee that it will handle many users at the same time. For this, load tests exist: they simulate simultaneous users and measure response times and errors. In this article, I use k6, an open-source tool from Grafana Labs, to perform a load test on a REST API in .NET 8. The test runs automatically in GitHub Actions on every change…
A load test was conducted on a .NET 8 REST API called Banco API using k6, an open-source tool from Grafana Labs. The test, written in JavaScript, simulated 20 concurrent users and measured response times and errors. The test was automated with GitHub Actions and ran in parallel with functional tests using Newman. The results showed that the API performed well, with a 95th percentile response time of 0.95ms and no failed requests, and were published to GitHub Pages.
The test ensured that the API's performance met certain thresholds, allowing for early detection of potential bottlenecks.
Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.