Basic load testing is worth doing, and worth doing often. Sometimes when you’re under a deadline with your e-commerce site, all you have time for is basic testing. But we’ll explain how user scenarios will make your e-commerce site testing better.
A user scenario is a script that reproduces the behavior you expect to see from your users. When you run a test, you can allocate one or more scenarios to that test so that your load tests are more accurate. You’re then doing a better job of testing the elements of your e-commerce site most likely to cause user load on your site.
Create at least one scenario that covers your expected user behavior. For example, what do most visitors do on your site? Do they arrive on the main (home) page, or on a landing page from an advertising campaign? Be sure to test traffic on the most likely pages.
Also, consider including these user behaviors:
- Using your site’s search features
- Viewing product information, including images, reviews, specifications
- Choosing products, including colors, sizes and quantities as applicable
- Adding (multiple) products to cart
- Editing cart contents
- Checking out, including choosing shipping
- Logging in or signing up for an account
One scenario that covers most common behaviors is a good start. Time permitting, you should also create more to mimic more difficult user behavior (maybe lots of adding and removing items from cart, failed logins, and so forth).
As you build a more detailed and consistent load test plan, you can create more scenarios. Those scenarios might include processing returns, using store credit, contacting support, and so forth.
Once you’ve created a scenario or two, it’s easy to see how user scenarios will make your e-commerce site testing better. Your scheduled load tests will more accurately mimic how you expect site visitors to behave, putting load on the right elements of your site. Regular testing will uncover issues early, right after you’ve made a problematic code change, not when you’re scrambling to prepare for a peak season.