$30 off During Our Annual Pro Sale. View Details »

Mastering Performance Testing

Mastering Performance Testing

Avatar for Yusuf Tayman

Yusuf Tayman

October 09, 2023
Tweet

More Decks by Yusuf Tayman

Other Decks in Programming

Transcript

  1. What is the Performance Testing? Agenda Key Measurement of Metrics

    Types of Performance Testing Best Practices for Performance Testing
  2. What is the Performance Testing? Load testing Verify that applications

    can handle the expected traffic. Adapt your testing: stress tests, peak tests, soak tests, etc. Infrastructure testing Test how cloud-native systems scale. Isolate bottlenecks. Plan and provision infrastructure capacity. Chaos testing Simulate real-world traffic in your chaos experiments. Inject system failures in your k6 tests. Synthetic testing Traditional synthetic/ping testing is not enough anymore. Reuse your k6 tests to ensure availability in production. End-to-end web testing Mix browser and API testing— interact with real browsers and collect frontend metrics to get a holistic user view. Regression testing Test continuously to track changes in performance and reliability. Prevent software regressions from reaching production.
  3. Smoke Tests Smoke tests have a minimal load. Run them

    to verify that the system works well under minimal load and to gather baseline performance values. This test type consists of running tests with a few VUs — more than 5 VUs could be considered a mini-load test. Types of Load Tests
  4. Each time you create or update a script, run a

    smoke test Keep throughput small and duration short Considerations When you prepare a smoke test, consider the following: Types of Load Tests
  5. Load Testing An average-load test assesses how the system performs

    under a typical load. A typical load might be a regular day in production or an average moment. Types of Load Tests
  6. Know the specific number of users and the typical throughput

    per process in the system. Gradually increase load to the target average. Maintain average for a period longer than the ramp up. Consider a ramp-down period. Considerations When you prepare an average-load test, consider the following: Types of Load Tests
  7. Stress Testing The load pattern of a stress test resembles

    that of an average-load test. The main difference is higher load. To account for higher load, the ramp-up period takes longer in proportion to the load increase. Similarly, after the test reaches the desired load, it might last for slightly longer than it would in the average-load test. Types of Load Tests
  8. Know the specific number of users and the typical throughput

    per process in the system. Gradually increase load to the target average. Maintain average for a period longer than the ramp up. Consider a ramp-down period. Considerations When you prepare an average-load test, consider the following: Types of Load Tests
  9. The system's degradation of performance and resource consumption over extended

    periods. The system's availability and stability during extended periods Soak Testing Soak testing is another variation of the Average-Load test. It focuses on extended periods, analyzing the following: Types of Load Tests
  10. Configure the duration to be considerably longer than any other

    test. If possible, re-use the average-load test script Don't run soak tests before running smoke and average-load tests. Monitor the backend resources and code efficiency. Considerations When you prepare to run a soak test, consider the following: Types of Load Tests
  11. Key Measurement of Performance Testing CPU Utilisation Response Time Response

    Time Failure Rate Number Of Concurrent Virtual Users (VUs) Throughput Latency Request Time
  12. Key Measurement of Performance Testing First Contentful Paint Large Contentful

    Paint Speed Index Time to Interactive Total Blocking Time Cumulative Layout Shift