Preventing Setup Requests from Influencing Test Results #891
Labels
enhancement
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
So in using K6 to do some performance testing of our API and in some cases we need to do preconditions in order to ensure our tests are successful (the easiest example is authentication). I'm able to easily add the authentication request in the setup and then later add it into the header of all of my requests.
My issue is that this request (and any other setup/precondition/postcondition requests I want to make) pollute the results of my test. If for some reason one of these requests are particularly expensive or inexpensive, it can make a meaningful difference in my tests and their results.
I'm looking for a way to purposefully direct K6 to not track the results of a certain request when it comes to aggregating the results of my test and judging whether or not it passes my test thresholds.
Immediate ideas that come to mind are like an untrackedGet method that mirrors your get function without calling whatever adds its results to the later evaluated results, so that I could do http.untrackedGet() (And similar versions for your other verbs)
The only other alternative I have is to try to do this in a script external to k6 and then have that script also call k6 passing in the values to the docker container but that seems unnecessarily burdensome.
The text was updated successfully, but these errors were encountered: