Hey K6 Team,
I am working in a demo with K6 and OpenApi to present in the company. The idea is to use the spec file from OpenApi in order to build the performance test.
I have been able to go through the documentation and the brilliant post that you have here: https://k6.io/blog/load-testing-your-api-with-swagger-openapi-and-k6
Correct me if I am wrong but I see the following behavior
- Endpoints defined in Swagger are transformed into a group(K6)
- Endpoints with different HTTP Methods defined will be transformed inside 1 group adding a comment like //Request No.1, Request No 2, etc
- Responses defined in swagger file are transformed into a check(K6)
If there is something else that can be used in the conversation, I would be glad if you could share this with me.
I am concerned about those scenarios that you need to run Request 1 from Endpoint 1, Request 3 from Endpoint 2, and Request 4 from Endpoint 3. Is there an easy way to do this? or the converted will just convert this spec file into the structure mentioned above?
I would like to know if you will keep extending this with to help the teams to use this converted to start writing scenarios with them in an easy way or how can I contribute with the project. Right now some cool stuff that could be added are :
- Set the Parameters defined in swagger file as Environment variables. On this way it will not be needed to update the “TODO_EDIT”
- Possible to automatic replace the “TODO_EDIT” with a value, for example reading and replacing this before executing the test with K6
- Use parameters definition like required and minLenght to make the conversion of the spec file into a k6 script
Thank you very much for your time
Hope you have a nice week