I’m trying to write the performance test plan and I need to determine which scenarios should be included to conduct the performance on it.
- Should I hit each API? or should I make a specific flow?
- About the users, can I use one user to login with and increase the VUs? or create as-needed as users before starting the test and using them all?
Thanks in advance
What I’d do is try to get some statistics about the usage of API and then test the performance of the ones that are used the most, to see how much they can handle. As for the users, you could you some library (like Faker) to generate large amounts of credible-looking fake data:
@moazadel can you give more scenarios to give you correct suggestion but below are few points:
- Look for stress & load testing
- Look for business critical API’s or consider frequently used API’s . any how you are covering other API’s in functional testing
- To mimic the real scenario , will suggest to have VUs.
- During execution , do not keep logs to debug
- Run multiple iterations and benchmark
The above are good ideas from a pragmatic perspective of “Where is the system likely to fail under real usage?”
From a systems perspective, if you’d like to get an understanding of your real bottlenecks are (and where things may fail in the future as the composition of “real usage” changes), I’d review the code and categorize endpoints as “High IO” (network/DB calls, writing to disk, etc) or “High CPU/Memory” since those scenarios are likely bottlenecks. Then I’d build those into my stress testing plan and as well.