I have no experience with load testing, however I’ve created a ASP.NET Core Web API in which I need to implement loading tests on the CI pipeline (Azure DevOps). I’m considering k6 to perform the load testing. I did some reading and how to write the tests, however I wasn’t able to find any material on the conceptual part of load testing.
My API gets a collection of small files via a HTTP POST request, saves the metadata from these files in a SQL Server database and saves the files (binaries) to Microsoft Azure Blob Storage. What is troubling me is that every time the pipeline runs I’ll make thousands of POST requests with mock files to the API. Meaning that my SQL Server database and Blob Storage container will increase greatly in size with each run.
How usually a scenario like this is handled? Would developers in this case typically purge the database and blob storage periodically? Also does this mean that I shouldn’t run the load tests against the production environment? I don’t want my production environment polluted with mock data. Also what’s the point of having load tests if I can’t run them against the production environment?
I was thinking of maybe running a docker image with a database just for load testing, but I wouldn’t be able to run something like the Microsoft Azure Blob Storage within a container… So I don’t know how to proceed on that end. I would really appreciate the input of professionals with load testing experience regarding these scenarios and the application of load testing in a real world environment.