While the common belief is that testing as early as possible is ideal, let’s look deeper into different contexts to determine its validity, specifically focusing on performance testing rather than functional testing.
Many articles suggest that performance testing should be conducted at the incomplete functional stage, where each API is individually tested. However, in reality, customers do not interact with individual APIs in isolation. Instead, they utilize a collection of interrelated APIs.
It is important to know that the performance of an API is slow, which impacts the overall system performance. Whereas the performance of all APIs is fast, does not guarantee a fast system as a whole.
When initiating performance testing during the early stages of system development, one of advantages is to identify any individual functional elements that exhibit performance issues at an early stage. However, this approach may result in higher testing costs.
Performance testing shares a similarity with automation testing in that both are best suited for stable system contexts that require repeated testing. If the source code is changed occur within a short period, applying performance testing inappropriately can lead to issues and increase the cost of executing the test.
It’s essential to determine the right kind of performance testing (API or functionality, specific modules, or the entire system) and the testing scope (covering all functions or specific functionalities identified as crucial by the development team). This ensures that the performance testing is targeted and in line with the project’s specific requirements.
Typically, I implement performance testing after the functional testing phase of a project.
Keep in mind that making changes to the source code for performance improvements can potentially impact the correctness of the functions. Therefore, it is necessary to recheck the function in terms of functional testing. This iterative process continues until the system meets both accuracy and performance requirements.
Finally, you see that early testing will find the problem soon, but how soon, and to what extent, you must consider getting the best effect.