{"id":578,"date":"2015-11-12T12:50:34","date_gmt":"2015-11-12T12:50:34","guid":{"rendered":"https:\/\/loadfocus.com\/blog\/?p=578"},"modified":"2023-06-19T09:47:49","modified_gmt":"2023-06-19T09:47:49","slug":"how-to-load-test-an-e-commerce-website","status":"publish","type":"post","link":"https:\/\/loadfocus.com\/blog\/2015\/11\/how-to-load-test-an-e-commerce-website","title":{"rendered":"How to Load Test an E-commerce Website?"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span><p class=\"lead\"><!-- pn-tldr --><\/p>\n<h2>Key takeaways<\/h2>\n<ul>\n<li>Test the full purchase path. Homepage load tells you almost nothing about checkout capacity.<\/li>\n<li>Payment and inventory are the usual failure points because they cannot be cached.<\/li>\n<li>Use distinct accounts and carts per virtual user or you measure a cache, not the shop.<\/li>\n<\/ul>\n<p><!-- \/pn-tldr -->If you own an E-commerce website or you are responsible with the performance of a E-commerce website there are some specific tests you would want to do in order to find potential bottlenecks and be confident nothing is going to break when a lot of users are going to access your E-commerce website.<\/p>\n<p><span style=\"color: #000000;\">Here are some potential performance and load tests I would recommend everyone needs to run.<\/span><br \/>\n<span style=\"color: #000000;\"> Have in mind that running a test with LoadFocus is pretty easy, it takes no longer than 30 seconds to configure a test, you don&#8217;t need any code and you can run the test from the browser.<\/span><\/p>\n<p><span style=\"color: #000000;\">As a prerequisite, I would suggest having a look at my previous post regarding<\/span> <a href=\"https:\/\/loadfocus.com\/blog\/2015\/08\/20\/top-10-performance-testing-tips-and-tricks\/\">top performance testing tips<\/a>.<\/p>\n<p>Steps to assess the performance of your E-commerce website:<\/p>\n<ol>\n<li>Get real usage of your website and expected visitors in the next period (have in mind any special deals your site may start promoting, email campaigns or other future marketing campaigns that are going to bring more traffic to your web application)<\/li>\n<li>Identify the location of your visitors in order to create real life testing scenarios<\/li>\n<li>Start small, and create a baseline test for your\u00a0load testing metrics: monitor response time, latency time, number of hits per second, the throughput of your website and if\u00a0any errors that appeared, find here more details about load testing metrics.<\/li>\n<\/ol>\n<p><strong>Load Tests<\/strong>:<\/p>\n<ol>\n<li><strong>Clients per duration<\/strong> at <strong>10<\/strong> and the <strong>Duration<\/strong> at <strong>60<\/strong> <strong>seconds.\u00a0<\/strong>Create first baseline test in LoadFocus, go to\u00a0new load test page:\n<ul>\n<li>Set <strong>Clients per duration<\/strong> at <strong>10<\/strong> and the <strong>Duration<\/strong> at <strong>60<\/strong> <strong>seconds<\/strong> &#8211;\u00a0resulting in a 60 seconds load test by 10 concurrent users\u00a0hitting the website every second from the configured location, a total of <strong>600 users<\/strong> loading the E-commerce website per test<br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"1107\" height=\"721\" class=\"aligncenter size-medium wp-image-586\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/new-load-test.png\" alt=\"new-load-test\" \/><\/li>\n<li>Run the test and start inspecting live results, check\u00a0<strong>response time, latency time, number of hits per second, the throughput<\/strong> of your website and if how many and what type of\u00a0<strong>errors<\/strong> were thrown.<br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"1203\" height=\"1011\" class=\"aligncenter size-medium wp-image-585\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/live-results-load-test.png\" alt=\"live-results-load-test\" \/><img loading=\"lazy\" decoding=\"async\" width=\"975\" height=\"644\" class=\"aligncenter size-medium wp-image-587\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/response-time-load-test-results.png\" alt=\"response-time-load-test-results\" \/><img loading=\"lazy\" decoding=\"async\" width=\"1004\" height=\"441\" class=\"aligncenter size-medium wp-image-584\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/errors-response-codes-load-test-results.png\" alt=\"errors-response-codes-load-test-results\" \/><\/li>\n<\/ul>\n<\/li>\n<li><strong>Clients per duration<\/strong> at <strong>50<\/strong>\u00a0and the <strong>Duration<\/strong> at <strong>60<\/strong> <strong>seconds.\u00a0<\/strong>Re-run the test\u00a0increasing the number of\u00a0<strong>Clients per duration<\/strong> at <b>50, <\/b>keeping the <strong>Duration<\/strong> at <strong>60<\/strong> <strong>seconds<\/strong>\n<ul>\n<li>After each run inspect the results and check if any errors are thrown from your E-commerce application, find here more\u00a0details about <a href=\"https:\/\/loadfocus.com\/blog\/2014\/07\/10\/errors-and-response-codes-in-load-testing-on-loadfocus-com\/\" class=\"broken_link\">potential errors and response codes in load testing<\/a>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"946\" height=\"460\" class=\"aligncenter size-full wp-image-582\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/50-ecommerce-users-per-second-load-test-results-chart.png\" alt=\"50-ecommerce-users-per-second-load-test-results-chart\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" width=\"1198\" height=\"986\" class=\"aligncenter size-medium wp-image-583\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/50-users-per-second-load-test-results.png\" alt=\"50-users-per-second-load-test-results\" \/><\/li>\n<li>Go to the Trends section and\u00a0compare the results\u00a0with the previous runs.<img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"655\" class=\"aligncenter size-medium wp-image-588\" src=\"https:\/\/loadfocus.com\/blog\/wp-content\/uploads\/trends-results-load-test.png\" alt=\"trends-results-load-test\" \/><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><span style=\"color: #000000;\">Continue by increasing the number of Clients per duration up to 1000 clients per second, also increase the Duration of the load test. This will help you identify potential memory-leaks of your applications,\u00a0unexpected service or app restarts.\u00a0If you have the ability to monitor the CPU and Memory of the instance where the website is hosted, this will add more value to your overall\u00a0E-commerce website performance assessment.<\/span><\/p>\n<p>Hope this\u00a0helps and happy load testing.<\/p>\n<p><a href=\"https:\/\/loadfocus.com\">LoadFocus<\/a> is a easy to use cloud testing tool\u00a0for <a href=\"https:\/\/loadfocus.com\/load-testing\">load testing<\/a>, <a href=\"https:\/\/loadfocus.com\/api-monitoring\">API monitoring<\/a>, <a href=\"https:\/\/loadfocus.com\/website-speed-testing\">website speed testing<\/a>. <strong><a href=\"https:\/\/loadfocus.com\">Try it free<\/a><\/strong><!-- pn-faq --><\/p>\n<h2>Frequently Asked Questions<\/h2>\n<h3>What should an e-commerce load test cover?<\/h3>\n<p>The full purchase path through to checkout. Homepage load is the easiest thing to serve and tells you almost nothing about whether people can actually buy.<\/p>\n<h3>Where do e-commerce sites usually fail?<\/h3>\n<p>Payment and inventory, because neither can be cached. They are also the steps where a failure costs an order rather than a page view.<\/p>\n<h3>Why does each virtual user need its own account?<\/h3>\n<p>Because sharing one account and cart means you are measuring a cache and a single database row. Distinct users produce the contention that real traffic produces.<\/p>\n<p><!-- \/pn-faq --><!-- pn-related-reading --><\/p>\n<h2>Related reading<\/h2>\n<ul>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2015\/08\/top-10-performance-testing-tips-and-tricks\">Top 10 Performance Testing Tips and Tricks<\/a><\/li>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2021\/04\/what-is-hits-per-second-in-performance-testing\">What is Hits per Second in Performance Testing?<\/a><\/li>\n<li><a href=\"https:\/\/loadfocus.com\/blog\/2013\/07\/what-is-throughput-in-performance-testing\">What is Throughput in Performance Testing? Definition + How to Measure<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\"><\/span> <span class=\"rt-time\"> 4<\/span> <span class=\"rt-label rt-postfix\">minutes read<\/span><\/span>Key takeaways Test the full purchase path. Homepage load tells you almost nothing about checkout capacity. Payment and inventory are the usual failure points because they cannot be cached. Use distinct accounts and carts per virtual user or you measure a cache, not the shop. If you own an E-commerce website or you are responsible&#8230;  <a href=\"https:\/\/loadfocus.com\/blog\/2015\/11\/how-to-load-test-an-e-commerce-website\" class=\"more-link\" title=\"Read How to Load Test an E-commerce Website?\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":3692,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"quote","meta":{"footnotes":""},"categories":[555,104],"tags":[90,91],"class_list":["post-578","post","type-post","status-publish","format-quote","has-post-thumbnail","hentry","category-cloud-testing","category-website-speed-testing","tag-e-commerce-load-testing","tag-fast-e-commerce-website","post_format-post-format-quote"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":1,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":2630,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions\/2630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media\/3692"}],"wp:attachment":[{"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/loadfocus.com\/blog\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}