Leanpub Header

Skip to main content

Practical Performance and Load Testing

Load testing is usually neglected in software development due to many factors such as being expensive, late, and incapable (for dynamic websites). As a result, we often see big websites crash on load. This book will show an easy, affordable (free) and practical performance and load testing approach, I call it Continuous Performance/Load Testing.

The author is letting you choose the price you pay for this book!

Pick Your Price...
PDF
EPUB
WEB
About

About

About the Book

Load testing is often neglected in software development. As a result, we often see websites crash due to load on the launch day.  With more and more end-users accessing websites using various devices anytime, anywhere, the load demand for web apps grows exponentially. While awareness of the need for load testing is widely acknowledged, there has been little improvement in load testing in software development. That is why we see so many "XXX site crashed on the first day" news. 

Here are the common challenges that software projects are now facing in load testing:

  • Load testing tools are expensive
  • Unable to load-test dynamic websites (using AJAX)
  • Load testing is conducted rarely, and often too late
  • Lack of skills in load testing
  • Fragile load test scripts, unable to maintain them along with application changes 

This book will show you a practical approach (Continuous Performance/Load Testing) to address the above.

  • Support modern websites. All operations, including AJAX, can be load-tested easily.
  • Free (as in freedom as well as free in ‘free beer'). The load test (and build) scripts are all in open-source and popular frameworks, with no vendor-locking. Load testing is no longer a luxury that only large software companies can afford.
  • Immediate Result. Set up and running can be done within one day!
  • Continuous Performance and Load Testing in a DevOps process. Detect performance or load issues early. 

Share this book

Price

Pick Your Price...

Minimum price

$20.00

$30.00

You pay

$30.00

Author earns

$24.00
$

All prices are in US $. You can pay in US $ or in your local currency when you check out.

EU customers: prices exclude VAT, which is added during checkout.

...Or Buy With Credits!

Number of credits (Minimum 2)

2
The author will earn $24.00 from your purchase!
You can get credits monthly with a Reader Membership

Author

About the Author

Zhimin Zhan

Zhimin Zhan is the founder and principal agile testing coach of AgileWay Pty Ltd, Australia. As an advisor and coach, he helps organisations implement test automation using Continuous Testing with open technologies, such as Selenium WebDriver / Appium. Zhimin is the creator of TestWise, the next-generation functional testing tool that supports functional test refactorings, and BuildWise, an international award-winning Continuous Testing Server. Zhimin is a frequent speaker and author of 14 books on software testing and programming. He shares his test automation and CI experience on Substack and Medium.

Contents

Table of Contents

Preface

  1. What makes this book unique?
  2. Who should read this book?
  3. How to read this book?
  4. Send me feedback

1Introduction

  1. 1.1Performance Testing vs Load Testing
  2. 1.2Benefits of Load Testing for web apps
  3. 1.3Why effective load testing is more necessary than ever?
  4. 1.4Reality Check
  5. 1.5Why do most projects do load testing poorly?
  6. 1.6Load Testing Approaches
  7. 1.6.1HTTP Protocol-based load testing
  8. 1.6.2Real browser-based load testing
  9. 1.7Review

2Practical Load Testing

  1. 2.1Load Testing Trends
  2. 2.1.1Approach: Protocol-based ⇒ Browser-based
  3. 2.1.2Who is doing load testing: one performance testing team ⇒ individual projects
  4. 2.1.3Tools: Expensive commercial proprietary ⇒ Free and open-source scripting
  5. 2.1.4Execution frequency: A few times ⇒ Early and frequently
  6. 2.1.5Execution mindset: Long and Regid ⇒ Short and Relax
  7. 2.2Success Factors
  8. 2.3Practical Load Testing
  9. 2.3.1The Team Owns it
  10. 2.3.2Starting small, Starting today
  11. 2.3.3Do it often as a part of CT
  12. 2.3.4Make every load testing short, less stringent
  13. 2.3.5Focus on the main, then the rest load testing targets
  14. 2.3.6The Process
  15. 2.4Case Study: How will I load test Census Australia?
  16. 2.4.1Prerequisite
  17. 2.4.2Process
  18. 2.4.3The Cost
  19. 2.4.4Why does it work?
  20. 2.4.5FAQ
  21. 2.5Review

3Protocol-based Performance and Load Testing

  1. 3.1How does Protocol-based testing works?
  2. 3.2Simple Performance/Load Testing Exercise
  3. 3.3Scripting with Mechanize
  4. 3.3.1Preparation
  5. 3.3.2Performance Testing
  6. 3.3.3Simple Load Testing
  7. 3.3.4Compare load results
  8. 3.3.5Failure to load test AJAX
  9. 3.4Load testing with JMeter
  10. 3.4.1Performance Testing
  11. 3.4.2Load Testing
  12. 3.5Handcrafted scripts vs GUI tools
  13. 3.6Review

4Test Syntax Framework

  1. 4.1RSpec
  2. 4.1.1Install and Run RSpec tests
  3. 4.1.2A performance test in RSpec
  4. 4.2Avoid Gherkin
  5. 4.3Review

5First Functional Performance Test

  1. 5.1Test Design
  2. 5.2Install Testing Tool
  3. 5.3New Performance Test Project
  4. 5.4Run the blank test
  5. 5.5Create test steps
  6. 5.5.1Create test steps manually
  7. 5.5.2Using TestWise Recorder
  8. 5.5.3Test case
  9. 5.6Add measurements
  10. 5.6.1Measure timings in Ruby
  11. 5.7Headless browser mode
  12. 5.8Compare performance testing results
  13. 5.9Measure AJAX operations
  14. 5.10Functional Test vs Functional Performance Test
  15. 5.11Review

6Performance Test Plan

  1. 6.1Scope of work
  2. 6.2Testing execution approach
  3. 6.3Automation framework
  4. 6.3.1Protocol based frameworks
  5. 6.3.2Browser based frameworks
  6. 6.4Scripting language
  7. 6.5Test Syntax framework
  8. 6.6Test Creation: Recording vs Handcrafting
  9. 6.7Automation Tools
  10. 6.7.1Be efficient
  11. 6.7.2Preview browser-based tests
  12. 6.8Measurements
  13. 6.8.1Operation types for measurements
  14. 6.8.2Determine operations for timing
  15. 6.9Test executions and Reporting
  16. 6.10Review

7Continuous Performance Testing

  1. 7.1Why run performance tests in CT server
  2. 7.2Set up BuildWise Server
  3. 7.3Execute performance tests in a CT server
  4. 7.3.1Prerequisite
  5. 7.3.2Set a CT build project
  6. 7.3.3Trigger a CT run
  7. 7.3.4View Build result
  8. 7.3.5Continuous Execution
  9. Create your own CT performance testing project
  10. 7.4Case Study - Performance Testing WhenWise’s Reset
  11. 7.5Review

8Load Test Plan

  1. 8.1Load Testing Scenarios
  2. 8.2Determine the number of VUs required
  3. 8.3Generate Load
  4. 8.4Load Testing Metrics
  5. 8.5Define Success Criteria
  6. 8.6Parallel Execution in a CT server
  7. 8.7Execution Control
  8. 8.7.1Testing What?
  9. 8.7.2With how much load?
  10. 8.8Review

9Continuous Load Testing

  1. 9.1Generate Load from the command line
  2. 9.2How does Continuous Load Testing work?
  3. 9.2.1Benefits
  4. 9.2.2How can this approach handle a large load, e.g. 10000 concurrent users?
  5. 9.3Build Agents
  6. 9.3.1Build Agent Machines
  7. 9.3.2Install BuildWise agent software
  8. 9.3.3Configure first build agent
  9. 9.3.4Verify software on an Agent machine
  10. 9.3.5Verify Test Execution in an Agent
  11. 9.3.6Configure - Pre Execution (optional)
  12. 9.3.7Clone multiple build agents
  13. 9.4Set up Load Testing project
  14. 9.5Review

10Custom Load Testing Execution

  1. 10.1Control which tests to run
  2. 10.1.1Focused Scenario(s)
  3. 10.1.2Mix Scenarios
  4. 10.2Prepare Execution
  5. 10.3A Quick Test Run with one Build Agent
  6. 10.3.1Build Agent Specifiction Affects Performance
  7. 10.4Control the Load
  8. 10.4.1Set VU count
  9. 10.4.2Set test execution time
  10. 10.4.3Increase the load gradually
  11. 10.5Set Success Criteria
  12. 10.5.1Overall failure rate
  13. 10.5.2Indvidual Operation Timings
  14. 10.6Monitor Execution
  15. 10.7Case Study: Load Testing User Login
  16. 10.7.11 VU
  17. 10.7.23 VUs
  18. 10.7.36 VUs
  19. 10.7.49 VUs
  20. 10.7.512 VUs
  21. 10.7.6Report
  22. 10.7.7Analyse
  23. 10.7.8What’s next?
  24. 10.7.9Review
  25. 10.8Case Study: Mixed Scenarios
  26. 10.8.1Create a new Build Project by Clone
  27. 10.8.2Test Scripts
  28. 10.8.3Debug Operation Failure
  29. 10.8.4Report

11Identifying Flaws and Performance issues

  1. 11.1Functional Flaws
  2. 11.1.1Design Flaw
  3. 11.1.2Race conditions
  4. 11.2Non-Functional
  5. 11.2.1Website Crash
  6. 11.2.2Software Inefficient
  7. 11.2.3Deployment/Infrastructure Flaw
  8. 11.3Feedback Time is Critical
  9. 11.4Performance/Load Improvement Suggestions
  10. 11.5Review

12Continuous Testing Lab

  1. 12.1Costing Factor
  2. 12.2Start Small, Start Today
  3. 12.3Reliable
  4. 12.4Ongoing Mainteance
  5. 12.4.1Execution Environment
  6. 12.4.2BuildWise Agent
  7. 12.4.3App related
  8. 12.5Optimize For Speed
  9. 12.5.1Recommendations
  10. 12.6Review

13Maintaining Load Test Scripts

  1. 13.1Reusable functions and Page Objects
  2. 13.1.1Page Object Models
  3. 13.1.2Reusable Helper Functions
  4. 13.2Test Refactoring
  5. 13.3Coding conventions
  6. 13.4AJAX in Load Tests
  7. 13.5Review

14Best Practices

  1. 14.1Run a warm-up script first
  2. 14.2Using faster Selenium operations
  3. 14.2.1Prefer a faster locator
  4. 14.2.2Avoid Selecting an option by Index
  5. 14.2.3Reuse already located element
  6. 14.2.4Submit form instead of clicking a submit button
  7. 14.2.5Asserting page content using source
  8. 14.3Speed up non-operational steps
  9. 14.3.1Mimimize test data
  10. 14.3.2Using JavaScript to enter text data
  11. 14.4Avoid Conflicts
  12. 14.4.1Stabilise load scripts with randomization
  13. 14.4.2Leave no side effects
  14. 14.5Review

Appendix: TestWisely

  1. Test Scripts on Github
  2. Verify: Run tests on TestWise
  3. Set up a CT Lab on TestWisely and Run Performance/Load Tests
  4. Sign up TestWisely
  5. Set up Wizard
  6. Set up Build Projects
  7. Performance Testing
  8. Protocol-based
  9. Browser-based
  10. Execution
  11. Load Testing
  12. Allocate Build Agents
  13. A Run of Load Testing on TestWisely’s BuildWise
  14. How do Build Agents support different Apps?
  15. Test Scripts on Build Agents
  16. Update BuildWise Agent Configuration
  17. FAQ

Resources

  1. Books
  2. Tools
  3. Online Resource

References

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub