Performance testing is really important because that slow response time or outages cause the loss in terms of business & reputation for the company. Here are some tips that could help to test application performance:
1. Run performance tests from the production environment
The best way to ensure your test results are as accurate and real as possible is by running the test on your live production site. This way will let you catch real errors and bottlenecks. Of course, you have to choose wisely what time you start such a test, so you don’t affect real user business. Take a look at your analytics statistics to find traffic downtime. But if you can’t run it on production or you haven’t got prod environment yet, then try to run tests on your staging environment first and then create a prod replica as similar as possible using some cloud server, for example, so you don’t have to buy actual hardware. Don’t forget to seed staging or replica with production-like data, because running tests with the empty database is different from running with some seeded data.
2. Set-up backup servers and data replication
If something unexpected happens, you better thought through a procedure to recover application work. For example, the app receives unanticipated traffic or your data server has some issues. Setting up backup servers and database replication in advance will help you to recover quickly. If something happens, you can switch over while resolving the issues and problems. This procedure should be documented so the whole development team will know what to do even if someone is missing.
3. Check end-user performance
Ensure that UI experience is also fast. You can have really quick API responses but run into slow UI loading. Users don’t want to wait for content. Seed some important data and perform UI testing. For example, create a test user with hundreds of items in the cart and check out how smoothly will cart page render. If issues appear you can consider about code improving, adding pagination or progress bar to make waiting time more bearable.
The basic advice regarding response times has been about the same for a long time:
- If a response occurs within 0.1 seconds, users perceive it as “instant” meaning that you don’t need to do anything but show them the result.
- If a response occurs within 1 second, users will notice the delay and lose the feeling of operating directly on the data. However, special feedback still isn’t necessary.
- If a response takes more than 10 seconds, you’ll lose user attention. Either distract them or tell them how much longer it’ll take so they can start another task.
It is recommended to use progress bars for load times expected to be 5 seconds or more. Also if you render the page in sections, rather than all at once when it’s completely loaded, you’ll reduce your users’ passive wait time.
4. Early performance testing
The earlier you start load testing, the sooner you will catch bottlenecks and the sooner you can fix them. It is also useful to integrate load testing into CI/CD. By load testing regularly every time you change the code, commit builds and deploy, you will catch most of the problems right away. Also, you will have statistics about your system so it will be easier to understand after which moment all went wrong.
5. Simulate real-world user scenarios
Performance testing goal is to improve the user experience so when load testing, your users and their needs should be the priority. Make a research and look into analytics to create scenarios according to users habits. If they like to spend a lot of time browsing through your app catalog, put pauses there. A real-world load test makes sure you eliminate relevant bottlenecks, thus ensuring spectacular user experience.