Performance Testing


I had an opportunity to give a speech about how we can automate performance testing in CI/CD pipeline in a conference held in Istanbul for the first time "Test automation and Digital QA Submit Istanbul, #TAS19". My subject was "Automated Performance Testing", the first part of the speech is to explain what is performance tests. 

In this post, I want to explain my thoughts about performance testing. Next posts will focus on automated performance testing and using K6 as a performance testing tool.

What is Performance Testing By Definition

Defining the performance of the system by testing the functionalities of the system in terms of the non-functionalities 



Performance Testing is
  • A non-functional testing
  • Testing the functionalities of the system
  • Both black-box and white-box testing
  • Defining how the system works under any loads
  • Applied under different load levels
  • Applied under different load increments
  • Applied under different durations

What is Performance Testing in Terms of Process

Performance testing should be also executed in a process. Performance engineers should ensure that they collected requirements, created the correct amount of virtual users, created test scenarios and they can execute them. As a final, they should check the result and the system, if required after fixing, re-execution may be needed.



Performance testing should start with planning, in this stage, you should align with customer/user needs. Without understanding the requirements any test can not be evaluated. Two main parts of the testing are verification and validation. By verification, we are checking the requirements and by validation, we are checking these requirements are valid with the global expectation at least the targetted users. Therefore this stage is very important.

In the next steps, you should create performance test scripts and create test environment and in the execution stage, you can run test scripts against the requirements in the reserved/isolated performance testing environment.   

In the monitoring stage, you should check that the execution is happening as expected by checking the system. The performance scripts create requests which are reached to the related part of the system and they create related data on the databases/caches. Which means that your scripts run as expected. 

In the analyzing stage, you can check the result and if necessary you can fix some configurative, network-related or database-related problems. After that if necessary, you can get ready for the next iteration. These iterations should keep going until the desired level of confidence is gathered.

Types of Performance Testing

Types of performance testing depend on the strategy that applied during the test by means of the loads, the duration and increment of the load.

Load Test

The load test is to understand the behavior of the system under a specific load. It is performing under a specific amount of the load to check if the system gives the expected responses with keeping it stable for the long term

Load Test is
  • Basic form
  • Widely known-form
  • A specific amount of load
  • Checking the expected response time
  • Giving a result that users are facing 

Stress Test

The stress test is to test the upper boundary of the system. When the load is increased to the level of the upper boundary, the stress test aims to get the response of the system. 

Stress Test is
  • Testing the upper boundary of the system
  • Needing more resources
  • Needing more investigation for boundaries
  • Needing more attention
  • Prone to break the system, aka: soak, endurance testing
  • Preparation for promotion like black friday, 11.11 

Soak - Endurance Test

Soak test is to test the upper boundary of the system for a prolonged time. Soak is good if you are not sure the expected amount of the user for some occasions.

Soak Test is
  • Testing the upper boundary of the system
  • Testing the system for a prolonged time
  • Needing more resources
  • Needing more investigation for boundaries
  • Needing more attention
  • Aims to break the system
  • Preparation for campaigns like black Friday, 11.11 

Spike Test

Spike test is to test the behavior of the system when the amount of load is suddenly increased and decreased. It aims to find system failures when loads is changing to an unexpected amount. 

Spike Test is
  • Testing the sudden increase and decrease of loads
  • Requiring more load generations
    • depends on the tools (load the system, then spike it)
  • Good for some occasion like simulating 
    • push notifications for e-coms
    • announcing critical news

Capacity Test

Capacity testing is aiming to find the maximum amount of the user that the system can handle. By this test we can find the how many user can use the system.

Capacity Test is
  • Testing the max user
  • Finding the behavior when more users join
  • Providing info about the loss of user data

Volume Test

The volume test is testing the database directly instead of the whole system. With the volume testing, we can find if there is any bottleneck with the database system. 

Spike Test is
  • Testing the database 
  • Testing the with a large amount of data



Comments

Popular posts from this blog

Selenium Error "Element is not currently interactable and may not be manipulated"

Change Default Timeout and Wait Time of Capybara

Page-Object Pattern for Selenium Test Automation with Python

Performance Testing on CI: Locust is running on Jenkins

Getting the text of elements in Espresso