<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Load test types on Grafana Labs</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/</link><description>Recent content in Load test types on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/k6/v2.3.x/testing-guides/test-types/index.xml" rel="self" type="application/rss+xml"/><item><title>Smoke testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/smoke-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/smoke-testing/</guid><content><![CDATA[&lt;h1 id=&#34;smoke-testing&#34;&gt;Smoke testing&lt;/h1&gt;
&lt;p&gt;Smoke tests have a minimal load.
Run them to verify that the system works well under minimal load and to gather baseline performance values.&lt;/p&gt;
&lt;p&gt;This test type consists of running tests with a few VUs — more than 5 VUs could be considered a mini-load test.&lt;/p&gt;
&lt;p&gt;Similarly, the test should execute for a short period, either a low number of 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/reference/#iterations&#34;&gt;iterations&lt;/a&gt; or a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/reference/#duration&#34;&gt;duration&lt;/a&gt; from seconds to a few minutes maximum.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-smoke-test-overview.png&#34;
  alt=&#34;Overview of a smoke test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;In some testing conversation, smoke tests are also called shakeout tests.&lt;/p&gt;
&lt;h2 id=&#34;when-to-run-a-smoke-test&#34;&gt;When to run a Smoke test&lt;/h2&gt;
&lt;p&gt;Teams should run smoke tests whenever a test script is created or updated. Smoke testing should also be done whenever the relevant application code is updated.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a good practice to run a smoke test as a first step, with the following goals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify that your test script doesn&amp;rsquo;t have errors.&lt;/li&gt;
&lt;li&gt;Verify that your system doesn&amp;rsquo;t throw any errors (performance or system related) when under minimal load.&lt;/li&gt;
&lt;li&gt;Gather baseline performance metrics of your system’s response under minimal load.&lt;/li&gt;
&lt;li&gt;With simple logic, to serve as a &lt;a href=&#34;/docs/grafana-cloud/testing/synthetic-monitoring/create-checks/checks/k6/&#34;&gt;synthetic test&lt;/a&gt; to monitor the performance and availability of production environments.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When you prepare a smoke test, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Each time you create or update a script, run a smoke test&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Because smoke tests verify test scripts, try to run one every time you create or update a script. Avoid running other test types with untested scripts.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Keep throughput small and duration short&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Configure your test script to be executed by a small number of VUs (from 2 to 20) with few iterations or brief durations (30 seconds to 3 minutes).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;smoke-testing-in-k6&#34;&gt;Smoke testing in k6&lt;/h2&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { check, sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  vus: 3, // Key for Smoke test. Keep it at 2, 3, max 5 VUs
  duration: &amp;#39;1m&amp;#39;, // This can be shorter or just a few iterations
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  check(urlRes, { &amp;#39;status returned 200&amp;#39;: (r) =&amp;gt; r.status == 200 })
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The following script is an example smoke test. You can copy it, change the endpoints, and start testing. For more comprehensive test logic, refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/&#34;&gt;Examples&lt;/a&gt;.
The VU chart of a smoke test should look similar to this.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-smoke-test-k6-script-example.png&#34;
  alt=&#34;The shape of the smoke test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;The smoke test initially validates that your script runs without errors. If any script-related errors appear, correct the script before trying any more extensive tests.&lt;/p&gt;
&lt;p&gt;On the other hand, if you notice poor performance with these low VU numbers, report it, fix your environment, and try again with a smoke test before any further tests.&lt;/p&gt;
&lt;p&gt;Once your smoke test shows zero errors and the performance results seem acceptable, you can proceed to other test types.&lt;/p&gt;
]]></content><description>&lt;h1 id="smoke-testing">Smoke testing&lt;/h1>
&lt;p>Smoke tests have a minimal load.
Run them to verify that the system works well under minimal load and to gather baseline performance values.&lt;/p></description></item><item><title>Average-load testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/load-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/load-testing/</guid><content><![CDATA[&lt;h1 id=&#34;average-load-testing&#34;&gt;Average-load testing&lt;/h1&gt;
&lt;p&gt;An average-load test assesses how the system performs under typical load. Typical load might be a regular day in production or an average moment.&lt;/p&gt;
&lt;p&gt;Average-load tests simulate the number of concurrent users and requests per second that reflect average behaviors in the production environment. This type of test typically increases the throughput or VUs gradually and keeps that average load for some time. Depending on the system&amp;rsquo;s characteristics, the test may stop suddenly or have a short ramp-down period.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-average-load-test-overview.png&#34;
  alt=&#34;Overview of an average-load test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Since “load test” might refer to all types of tests that simulate traffic, this guide uses the name &lt;em&gt;average-load test&lt;/em&gt; to avoid confusion.
In some testing conversation, this test also might be called a day-in-life test or volume test.&lt;/p&gt;




&lt;div class=&#34;d-sm-flex flex-direction-row-reverse bg-gray-1 br-12 p-2 my-1&#34;&gt;
  &lt;img class=&#34;maxw-240 w-100p mb-1 lazyload&#34; data-src=&#34;/media/docs/learning-journey/map.svg&#34; width=&#34;237&#34; height=&#34;154&#34; alt=&#34;Grafana Learning Journeys&#34;&gt;
  &lt;div&gt;
    &lt;div class=&#34;h4 pt-0 pb-half fw-500&#34;&gt;Start your learning experience with Grafana Learning Paths&lt;/div&gt;
    &lt;p class=&#34;pr-1 pb-half&#34;&gt;Grafana Learning Paths provide a clear, structured path that leads you from beginner concepts to advanced use cases. Learn about this Grafana feature on &lt;a href=&#34;/docs/learning-paths/establish-k6-baseline/&#34;&gt;Establish a performance baseline with k6&lt;/a&gt;.&lt;/p&gt;
    &lt;div class=&#34;mx-auto&#34;&gt;
      &lt;a class=&#34;btn btn--primary btn--large arrow fw-600 br-8 w-175&#34; href=&#34;https://grafana.com/docs/learning-paths/establish-k6-baseline/&#34;&gt;Start learning&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&#34;when-to-run-an-average-load-test&#34;&gt;When to run an average-load test&lt;/h2&gt;
&lt;p&gt;Average-Load testing helps understand whether a system meets performance goals on a typical day (commonplace load). &lt;em&gt;Typical day&lt;/em&gt; here means when an average number of users access the application at the same time, doing normal, average work.&lt;/p&gt;
&lt;p&gt;You should run an average-load test to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Assess the performance of your system under a typical load.&lt;/li&gt;
&lt;li&gt;Identify early degradation signs during the ramp-up or full load periods.&lt;/li&gt;
&lt;li&gt;Assure that the system still meets the performance standards after system changes (code and infrastructure).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When you prepare an average-load test, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Know the specific number of users and the typical throughput per process in the system.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;To find this, look through APMs or analytic tools that provide information from the production environment. If you can&amp;rsquo;t access such tools, the business must provide these estimations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Gradually increase load to the target average.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That is, use a &lt;em&gt;ramp-up period&lt;/em&gt;. This period usually lasts between 5% and 15% of the total test duration. A ramp-up period has many essential uses:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;It gives your system time to warm up or auto-scale to handle the traffic.&lt;/li&gt;
&lt;li&gt;It lets you compare response times between the low-load and average-load stages.&lt;/li&gt;
&lt;li&gt;If you run tests using our cloud service, a ramp up lets the automated performance alerts understand the expected behavior of your system.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maintain average for a period longer than the ramp up.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Aim for an average duration at least five times longer than the ramp-up to assess the performance trend over a significant period of time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Consider a ramp-down period.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The ramp down is when virtual user activity gradually decreases. The ramp down usually lasts as long as the ramp up or a bit less.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;average-load-testing-in-k6&#34;&gt;Average-load testing in k6&lt;/h2&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;If this is your first time running load tests, we recommend starting small or configuring the ramp-up to be slow. Your application and infrastructure might not be as rock solid as you think. We&amp;rsquo;ve had thousands of users run load tests that quickly crash their applications (or staging environments).&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;The goal of an average-load test is to simulate the average amount of activity on a typical day in production. The pattern follows this sequence:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase the script&amp;rsquo;s activity until it reaches the desired number of users and throughput.&lt;/li&gt;
&lt;li&gt;Maintain that load for a while&lt;/li&gt;
&lt;li&gt;Depending on the test case, stop the test or let it ramp down gradually.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Configure load in the &lt;code&gt;options&lt;/code&gt; object:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  // Key configurations for avg load test in this section
  stages: [
    { duration: &amp;#39;5m&amp;#39;, target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes.
    { duration: &amp;#39;30m&amp;#39;, target: 100 }, // stay at 100 users for 30 minutes
    { duration: &amp;#39;5m&amp;#39;, target: 0 }, // ramp-down to 0 users
  ],
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This script logic has only one request (to open a web page). Your test behavior likely has more steps. If you would like to see more complex tests that use groups, checks, thresholds, and helper functions, refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/&#34;&gt;Examples&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The VU or throughput chart of an average-load test looks similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-average-load-test-k6-script-example.png&#34;
  alt=&#34;The shape of the average-load test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;An initial outcome for the average-load test appears during the ramp-up period to find whether the response time degrades as the load increases. Some systems might even fail during the ramp-up period.&lt;/p&gt;
&lt;p&gt;The test validates if the system&amp;rsquo;s performance and resource consumption stay stable during the period of full load, as some systems may display erratic behavior in this period.&lt;/p&gt;
&lt;p&gt;Once you know your system performs well and survives a typical load, you may need to push it further to determine how it behaves at above-average conditions. Some of these above-average conditions are known as 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/test-types/stress-testing/&#34;&gt;Stress tests&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="average-load-testing">Average-load testing&lt;/h1>
&lt;p>An average-load test assesses how the system performs under typical load. Typical load might be a regular day in production or an average moment.&lt;/p></description></item><item><title>Stress testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/stress-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/stress-testing/</guid><content><![CDATA[&lt;h1 id=&#34;stress-testing&#34;&gt;Stress testing&lt;/h1&gt;
&lt;p&gt;Stress testing assesses how the system performs when loads are heavier than usual.&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-stress-test-overview.png&#34;
  alt=&#34;Overview of a stress test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;In some testing conversation, stress tests might also be called rush-hour, surge, or scale tests.&lt;/p&gt;




&lt;div class=&#34;d-sm-flex flex-direction-row-reverse bg-gray-1 br-12 p-2 my-1&#34;&gt;
  &lt;img class=&#34;maxw-240 w-100p mb-1 lazyload&#34; data-src=&#34;/media/docs/learning-journey/map.svg&#34; width=&#34;237&#34; height=&#34;154&#34; alt=&#34;Grafana Learning Journeys&#34;&gt;
  &lt;div&gt;
    &lt;div class=&#34;h4 pt-0 pb-half fw-500&#34;&gt;Start your learning experience with Grafana Learning Paths&lt;/div&gt;
    &lt;p class=&#34;pr-1 pb-half&#34;&gt;Grafana Learning Paths provide a clear, structured path that leads you from beginner concepts to advanced use cases. Learn about this Grafana feature on &lt;a href=&#34;/docs/learning-paths/find-k6-limits/&#34;&gt;Find your system&amp;rsquo;s limits with k6&lt;/a&gt;.&lt;/p&gt;
    &lt;div class=&#34;mx-auto&#34;&gt;
      &lt;a class=&#34;btn btn--primary btn--large arrow fw-600 br-8 w-175&#34; href=&#34;https://grafana.com/docs/learning-paths/find-k6-limits/&#34;&gt;Start learning&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&#34;when-to-perform-a-stress-test&#34;&gt;When to perform a Stress test&lt;/h2&gt;
&lt;p&gt;Stress tests verify the stability and reliability of the system under conditions of heavy use.
Systems may receive higher than usual workloads on unusual moments such as process deadlines, paydays, rush hours, ends of the workweek, and many other behaviors that might cause frequent higher-than-average traffic.&lt;/p&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When you run a stress test, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Load should be higher than what the system experiences on average.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some testers might have default targets for stress tests—say an increase upon average load by 50 or 100 percent—there&amp;rsquo;s no fixed percentage.&lt;/p&gt;
&lt;p&gt;The load simulated in a Stress test depends on the stressful situations that the system may be subject to. Sometimes this may be just a few percentage points above that average. Other times, it can be 50 to 100% higher, as mentioned. Some stressful situations can be twice, triple, or even orders of magnitude higher.&lt;/p&gt;
&lt;p&gt;Define load according to the risk load patterns that the system may receive.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Only run stress tests after running average-load tests.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Identify performance issues under average-load tests before trying anything more challenging.
This sequence is essential.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Re-use the Average-Load test script.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Modify the parameters to have higher load or VUs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Expect worse performance compared to average load.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This test determines how much the performance degrades with the extra load and whether the system survives it. A well-performant system should respond with consistent response times when handling a constant workload for an extended period.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;stress-testing-in-k6&#34;&gt;Stress testing in k6&lt;/h2&gt;
&lt;p&gt;The load in a stress test resembles load in an average-load test.
The difference is that it reaches a higher level of load.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase the script&amp;rsquo;s activity further in a slower ramp-up until it reaches an above-average number of users or throughput.&lt;/li&gt;
&lt;li&gt;Maintain that load for a while.&lt;/li&gt;
&lt;li&gt;Depending on the test case, stop or ramp down gradually.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  // Key configurations for Stress in this section
  stages: [
    { duration: &amp;#39;10m&amp;#39;, target: 200 }, // traffic ramp-up from 1 to a higher 200 users over 10 minutes.
    { duration: &amp;#39;30m&amp;#39;, target: 200 }, // stay at higher 200 users for 30 minutes
    { duration: &amp;#39;5m&amp;#39;, target: 0 }, // ramp-down to 0 users
  ],
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more complex behavior, refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/&#34;&gt;Examples&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The VU or throughput chart of a Stress test looks similar to this:&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-stress-test-k6-script-example.png&#34;
  alt=&#34;The shape of the stress test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;Note that in the same way as the average-load test, the Stress test starts at 0 and increases beyond the point tested in the average-load type. The ramp-up and ramp-down periods are longer to allow a more realistic response.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-note&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Note&lt;/p&gt;&lt;p&gt;Run stress tests only after smoke and average-load tests. Running this test type earlier may be wasteful and make it hard to pinpoint problems if they appear at low volumes or at loads under the average utilization.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;Like the average-load test, an initial outcome for the Stress test shows up during the ramp-up period to identify response time degradation as the load increases further than the average utilization. Commonly, the performance degrades, and even the system&amp;rsquo;s stability crashes as we push the system further than the average-load test.&lt;/p&gt;
&lt;p&gt;During the full load period, verification is vital if the system&amp;rsquo;s performance and resource consumption stays stable with a higher load.&lt;/p&gt;
&lt;p&gt;Now that you know that your system can handle outstanding load events, the teams generally check if the system performs well over extended periods.
That is, they run a 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/test-types/soak-testing/&#34;&gt;Soak test&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="stress-testing">Stress testing&lt;/h1>
&lt;p>Stress testing assesses how the system performs when loads are heavier than usual.&lt;/p>
&lt;p>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.&lt;/p></description></item><item><title>Soak testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/soak-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/soak-testing/</guid><content><![CDATA[&lt;h1 id=&#34;soak-testing&#34;&gt;Soak testing&lt;/h1&gt;
&lt;p&gt;Soak testing is another variation of the Average-Load test. It focuses on extended periods, analyzing the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The system&amp;rsquo;s degradation of performance and resource consumption over extended periods.&lt;/li&gt;
&lt;li&gt;The system&amp;rsquo;s availability and stability during extended periods.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The soak test differs from an average-load test in test duration. In a soak test, the peak load duration (usually an average amount) extends several hours and even days.
Though the duration is considerably longer, the ramp-up and ramp-down periods of a soak test are the same as an average-load test.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-soak-test-overview.png&#34;
  alt=&#34;Overview of a soak test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;In some testing conversation, a soak test might be called an endurance, constant high load, or stamina test.&lt;/p&gt;




&lt;div class=&#34;d-sm-flex flex-direction-row-reverse bg-gray-1 br-12 p-2 my-1&#34;&gt;
  &lt;img class=&#34;maxw-240 w-100p mb-1 lazyload&#34; data-src=&#34;/media/docs/learning-journey/map.svg&#34; width=&#34;237&#34; height=&#34;154&#34; alt=&#34;Grafana Learning Journeys&#34;&gt;
  &lt;div&gt;
    &lt;div class=&#34;h4 pt-0 pb-half fw-500&#34;&gt;Start your learning experience with Grafana Learning Paths&lt;/div&gt;
    &lt;p class=&#34;pr-1 pb-half&#34;&gt;Grafana Learning Paths provide a clear, structured path that leads you from beginner concepts to advanced use cases. Learn about this Grafana feature on &lt;a href=&#34;/docs/learning-paths/k6-soak-testing/&#34;&gt;Test system endurance with k6 soak testing&lt;/a&gt;.&lt;/p&gt;
    &lt;div class=&#34;mx-auto&#34;&gt;
      &lt;a class=&#34;btn btn--primary btn--large arrow fw-600 br-8 w-175&#34; href=&#34;https://grafana.com/docs/learning-paths/k6-soak-testing/&#34;&gt;Start learning&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&#34;when-to-perform-a-soak-test&#34;&gt;When to perform a Soak test&lt;/h2&gt;
&lt;p&gt;Most systems must stay turned on and keep working for days, weeks, and months without intervention. This test verifies the system stability and reliability over extended periods of use.&lt;/p&gt;
&lt;p&gt;This test type checks for common performance defects that show only after extended use. Those problems include response time degradation, memory or other resource leaks, data saturation, and storage depletion.&lt;/p&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When you prepare to run a soak test, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Configure the duration to be considerably longer than any other test.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Some typical values are 3, 4, 8, 12, 24, and 48 to 72 hours.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;If possible, re-use the average-load test script&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Changing only the peak durations for the aforementioned values.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Don&amp;rsquo;t run soak tests before running smoke and average-load tests.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Each test uncovers different problems.
Running this first may cause confusion and resource waste.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Monitor the backend resources and code efficiency.&lt;/strong&gt;
Since we are checking for system degradation, monitoring the backend resources and code efficiency is highly recommended.
Of all test types, backend monitoring is especially important for soak tests.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;soak-testing-in-k6&#34;&gt;Soak testing in k6&lt;/h2&gt;
&lt;p&gt;The soak test is almost the same as the average-load test. The only difference is the increased duration of the load plateau.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase the load until it reaches an average number of users or throughput.&lt;/li&gt;
&lt;li&gt;Maintain that load for &lt;strong&gt;a considerably longer time.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Finally, depending on the test case, stop or ramp down gradually.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Configure the load duration in the &lt;code&gt;options&lt;/code&gt; object:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  // Key configurations for Soak test in this section
  stages: [
    { duration: &amp;#39;5m&amp;#39;, target: 100 }, // traffic ramp-up from 1 to 100 users over 5 minutes.
    { duration: &amp;#39;8h&amp;#39;, target: 100 }, // stay at 100 users for 8 hours!!!
    { duration: &amp;#39;5m&amp;#39;, target: 0 }, // ramp-down to 0 users
  ],
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For more complex behavior, refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/&#34;&gt;Examples&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Notice that, as in an average-load test, peak load plateaus at 100. VUs.
The difference is in duration.
In this soak, peak load maintains for 8 hours rather than some minutes.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-soak-test-k6-script-example.png&#34;
  alt=&#34;The shape of the soak test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;If we execute this test after the previous types, we should have a system performing well under previous scenarios. In this test, monitor for changes in any performance metric as time passes. Try to correlate any impact with backend measurement changes that indicate degradation over time. Such changes can be gradual degradations, as mentioned, and sudden changes (improvements, too) in response time and backend hardware resources. Backend resources to check are RAM consumed, CPU, Network, and growth of cloud resources, among others.&lt;/p&gt;
&lt;p&gt;The expected outcome is that the performance and resource utilization of the backend stays stable or within expected variations.&lt;/p&gt;
&lt;p&gt;After you run all the previous test types, you know your system performs well at many different loads: small, average, high, and extended.&lt;/p&gt;
]]></content><description>&lt;h1 id="soak-testing">Soak testing&lt;/h1>
&lt;p>Soak testing is another variation of the Average-Load test. It focuses on extended periods, analyzing the following:&lt;/p>
&lt;ul>
&lt;li>The system&amp;rsquo;s degradation of performance and resource consumption over extended periods.&lt;/li>
&lt;li>The system&amp;rsquo;s availability and stability during extended periods.&lt;/li>
&lt;/ul>
&lt;p>The soak test differs from an average-load test in test duration. In a soak test, the peak load duration (usually an average amount) extends several hours and even days.
Though the duration is considerably longer, the ramp-up and ramp-down periods of a soak test are the same as an average-load test.&lt;/p></description></item><item><title>Spike testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/spike-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/spike-testing/</guid><content><![CDATA[&lt;h1 id=&#34;spike-testing&#34;&gt;Spike testing&lt;/h1&gt;
&lt;p&gt;A spike test verifies whether the system survives and performs under sudden and massive rushes of utilization.&lt;/p&gt;
&lt;p&gt;Spike tests are useful when the system may experience events of sudden and massive traffic.
Examples of such events include ticket sales (Taylor Swift), product launches (PS5), broadcast ads (Super Bowl), process deadlines (tax declaration), and seasonal sales (Black Friday). Also, spikes in traffic could be caused by more frequent events such as rush hours, a particular task, or a use case.&lt;/p&gt;
&lt;p&gt;Spike testing increases to extremely high loads in a very short or non-existent ramp-up time.
Usually, it has no plateau period or is very brief, as real users generally do not stick around doing extra steps in these situations. In the same way, the ramp-down is very fast or non-existent, letting the process iterate only once.&lt;/p&gt;
&lt;p&gt;This test might include different processes than the previous test types, as spikes often aren&amp;rsquo;t part of an average day in production. It may also require adding, removing, or modifying processes on the script that were not in the average-load tests.&lt;/p&gt;
&lt;p&gt;Occasionally, teams should revamp the system to allow or prioritize resources for the high-demand processes during the event.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-spike-test-overview.png&#34;
  alt=&#34;Overview of a spike test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;




&lt;div class=&#34;d-sm-flex flex-direction-row-reverse bg-gray-1 br-12 p-2 my-1&#34;&gt;
  &lt;img class=&#34;maxw-240 w-100p mb-1 lazyload&#34; data-src=&#34;/media/docs/learning-journey/map.svg&#34; width=&#34;237&#34; height=&#34;154&#34; alt=&#34;Grafana Learning Journeys&#34;&gt;
  &lt;div&gt;
    &lt;div class=&#34;h4 pt-0 pb-half fw-500&#34;&gt;Start your learning experience with Grafana Learning Paths&lt;/div&gt;
    &lt;p class=&#34;pr-1 pb-half&#34;&gt;Grafana Learning Paths provide a clear, structured path that leads you from beginner concepts to advanced use cases. Learn about this Grafana feature on &lt;a href=&#34;/docs/learning-paths/k6-spike-testing/&#34;&gt;Test resilience with k6 spike testing&lt;/a&gt;.&lt;/p&gt;
    &lt;div class=&#34;mx-auto&#34;&gt;
      &lt;a class=&#34;btn btn--primary btn--large arrow fw-600 br-8 w-175&#34; href=&#34;https://grafana.com/docs/learning-paths/k6-spike-testing/&#34;&gt;Start learning&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&#34;when-to-perform-a-spike-test&#34;&gt;When to perform a spike test&lt;/h2&gt;
&lt;p&gt;This test must be executed when the system expects to receive a sudden rush of activity.&lt;/p&gt;
&lt;p&gt;When the system expects this type of behavior, the spike test helps identify how the system will behave and if it will survive the sudden rush of load. The load is considerably above the average and might focus on a different set of processes than the other test types.&lt;/p&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;p&gt;When preparing for a spike test, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Focus on key processes in this test type.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Assess whether the spike in traffic triggers the same or different processes from the other test types. Create test logic accordingly.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The test often won&amp;rsquo;t finish.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Errors are common under these scenarios.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run, tune, repeat.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When your system is at risk of spike events, the team must run a spikes test and tune the system several times.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Monitor.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Backend monitoring is a must for successful outcomes of this test.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;spike-testing-in-k6&#34;&gt;Spike testing in k6&lt;/h2&gt;
&lt;p&gt;The key differentiators of the spike test are the simulation of sudden and very high loads. It lacks a plateau (full load) duration or is usually brief.&lt;/p&gt;
&lt;p&gt;Sometimes, the test may require a load plateau for some time. If a plateau is needed, it&amp;rsquo;s generally short. A ramp-down can also be quick or unnecessary as the goal is to suddenly increase the system&amp;rsquo;s load.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  // Key configurations for spike in this section
  stages: [
    { duration: &amp;#39;2m&amp;#39;, target: 2000 }, // fast ramp-up to a high point
    // No plateau
    { duration: &amp;#39;1m&amp;#39;, target: 0 }, // quick ramp-down to 0 users
  ],
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
  // MORE STEPS
  // Add only the processes that will be on high demand
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;In a spike test, load quickly increases to an extreme level.
The ramp-down period follows when the test reaches the maximum, returning to 0 quickly.&lt;/p&gt;
&lt;p&gt;A spike test gets its name from the shape of its load when represented graphically.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-spike-test-k6-script-example.png&#34;
  alt=&#34;The shape of the spike test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;Some performance metrics to assess in spike tests include pod speeds, recovery times after the load rush, time to return to normal, or the behavior on crucial system processes during the overload.&lt;/p&gt;
&lt;p&gt;Finding how the system responds (if it survives) to the sudden rush helps to optimize it to guarantee that it can perform during a real event. In some events, the load is so high that the whole system may have to be optimized to deal with the key processes. In these cases, repeat the test until the system confidence is high.&lt;/p&gt;
]]></content><description>&lt;h1 id="spike-testing">Spike testing&lt;/h1>
&lt;p>A spike test verifies whether the system survives and performs under sudden and massive rushes of utilization.&lt;/p>
&lt;p>Spike tests are useful when the system may experience events of sudden and massive traffic.
Examples of such events include ticket sales (Taylor Swift), product launches (PS5), broadcast ads (Super Bowl), process deadlines (tax declaration), and seasonal sales (Black Friday). Also, spikes in traffic could be caused by more frequent events such as rush hours, a particular task, or a use case.&lt;/p></description></item><item><title>Breakpoint testing</title><link>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/breakpoint-testing/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/testing-guides/test-types/breakpoint-testing/</guid><content><![CDATA[&lt;h1 id=&#34;breakpoint-testing&#34;&gt;Breakpoint testing&lt;/h1&gt;
&lt;p&gt;Breakpoint testing aims to find system limits. Reasons you might want to know the limits include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To tune or care for the system&amp;rsquo;s weak spots to relocate those higher limits at higher levels.&lt;/li&gt;
&lt;li&gt;To help plan remediation steps in those cases and prepare for when the system nears those limits.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In other words, knowing where and how a system starts to fail helps prepare for such limits.&lt;/p&gt;
&lt;p&gt;A breakpoint ramps to unrealistically high numbers.
This test commonly has to be stopped manually or automatically as thresholds start to fail. When these problems appear, the system has reached its limits.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-breakpoint-test-overview.png&#34;
  alt=&#34;Overview of a breakpoint test&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The breakpoint test is another test type with no clear naming consensus.
In some testing conversation, it&amp;rsquo;s also known as capacity, point load, and limit testing.&lt;/p&gt;




&lt;div class=&#34;d-sm-flex flex-direction-row-reverse bg-gray-1 br-12 p-2 my-1&#34;&gt;
  &lt;img class=&#34;maxw-240 w-100p mb-1 lazyload&#34; data-src=&#34;/media/docs/learning-journey/map.svg&#34; width=&#34;237&#34; height=&#34;154&#34; alt=&#34;Grafana Learning Journeys&#34;&gt;
  &lt;div&gt;
    &lt;div class=&#34;h4 pt-0 pb-half fw-500&#34;&gt;Start your learning experience with Grafana Learning Paths&lt;/div&gt;
    &lt;p class=&#34;pr-1 pb-half&#34;&gt;Grafana Learning Paths provide a clear, structured path that leads you from beginner concepts to advanced use cases. Learn about this Grafana feature on &lt;a href=&#34;/docs/learning-paths/find-k6-limits/&#34;&gt;Find your system&amp;rsquo;s limits with k6&lt;/a&gt;.&lt;/p&gt;
    &lt;div class=&#34;mx-auto&#34;&gt;
      &lt;a class=&#34;btn btn--primary btn--large arrow fw-600 br-8 w-175&#34; href=&#34;https://grafana.com/docs/learning-paths/find-k6-limits/&#34;&gt;Start learning&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;h2 id=&#34;when-to-run-a-breakpoint-test&#34;&gt;When to run a breakpoint test&lt;/h2&gt;
&lt;p&gt;Teams execute a breakpoint test whenever they must know their system&amp;rsquo;s diverse limits. Some conditions that may warrant a breakpoint test include the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The need to know if the system&amp;rsquo;s load expects to grow continuously&lt;/li&gt;
&lt;li&gt;If current resource consumption is considered high&lt;/li&gt;
&lt;li&gt;After significant changes to the code-base or infrastructure.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;How often to run this test type depends on the risk of reaching the system limits and the number of changes to provision infrastructure components.&lt;/p&gt;
&lt;p&gt;Once the breakpoint runs and the system limits have been identified, you can repeat the test after the tuning exercise to validate how it impacted limits. Repeat the test-tune cycle until the team is satisfied.&lt;/p&gt;
&lt;h2 id=&#34;considerations&#34;&gt;Considerations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Avoid breakpoint tests in elastic cloud environments.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The elastic environment may grow as the test moves further, finding only the limit of your cloud account bill. If this test runs on a cloud environment, &lt;strong&gt;turning off elasticity on all the affected components is strongly recommended&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Increase the load gradually.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A sudden increase may make it difficult to pinpoint why and when the system starts to fail.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;System failure could mean different things to different teams&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You might want to identify each of the following failure points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Degraded performance. The response times increased, and user experience decreased.&lt;/li&gt;
&lt;li&gt;Troublesome performance. The response times get to a point where the user experience severely degrades.&lt;/li&gt;
&lt;li&gt;Timeouts. Processes are failing due to extremely high response times.&lt;/li&gt;
&lt;li&gt;Errors. The system starts responding with HTTP error codes.&lt;/li&gt;
&lt;li&gt;System failure. The system collapsed.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;You can repeat this test several times&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Repeating after each tuning might let the you push the system further.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Run breakpoints only when the system is known to perform under all other test types.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The breakpoint test might go far if the system performs poorly with the previous testing types.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;breakpoint-testing-in-k6&#34;&gt;Breakpoint testing in k6&lt;/h2&gt;
&lt;p&gt;The breakpoint test is straightforward. Load slowly ramps up to a considerably high level.
It has no plateau, ramp-down, or other steps. And it generally fails before reaching the indicated point.&lt;/p&gt;
&lt;p&gt;k6 offers two ways to increase the activity: increasing VUs or increasing throughput (
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/concepts/open-vs-closed/&#34;&gt;open and closed models&lt;/a&gt;).
Different from other load test types, which should be stopped when the system degrades to a certain point, breakpoint load increases even as the system starts to degrade.
That makes it recommendable to use 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/ramping-arrival-rate/&#34;&gt;ramping-arrival-rate&lt;/a&gt; for a breakpoint test.&lt;/p&gt;
&lt;p&gt;The test keeps increasing load or VUs until it reaches the defined breaking point or system limits, at which point the test stops or is aborted.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JavaScript&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-javascript&#34;&gt;import http from &amp;#39;k6/http&amp;#39;;
import { sleep } from &amp;#39;k6&amp;#39;;

export const options = {
  // Key configurations for breakpoint in this section
  executor: &amp;#39;ramping-arrival-rate&amp;#39;, //Assure load increase if the system slows
  stages: [
    { duration: &amp;#39;2h&amp;#39;, target: 20000 }, // just slowly ramp-up to a HUGE load
  ],
};

export default () =&amp;gt; {
  const urlRes = http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
  // MORE STEPS
  // Here you can have more steps or complex script
  // Step1
  // Step2
  // etc.
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/chart-breakpoint-test-k6-script-example.png&#34;
  alt=&#34;The shape of the breakpoint test as configured in the preceding script&#34; width=&#34;1920&#34;
     height=&#34;540&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The test must be stopped before it completes the scheduled execution.
You can stop the test manually or with a threshold:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To stop k6 manually in the CLI, press &lt;code&gt;Ctrl&#43;C&lt;/code&gt; in Linux or Windows, and &lt;code&gt;Command .&lt;/code&gt; in Mac.&lt;/li&gt;
&lt;li&gt;To stop the test using a threshold, you must define &lt;code&gt;abortOnFail&lt;/code&gt; as true.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/thresholds/&#34;&gt;Thresholds&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;results-analysis&#34;&gt;Results analysis&lt;/h2&gt;
&lt;p&gt;A breakpoint test must cause system failure.
The test helps identify the failure points of our system and how the system behaves once it reaches its limits.&lt;/p&gt;
&lt;p&gt;Once the system limits are identified, the team has two choices: accept them or tune the system.&lt;/p&gt;
&lt;p&gt;If the decision is to accept the limits, the test results help teams prepare and act when the system is nearing such limits.&lt;/p&gt;
&lt;p&gt;These actions could be:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prevent reaching such limits&lt;/li&gt;
&lt;li&gt;Grow system resources&lt;/li&gt;
&lt;li&gt;Implement corrective actions for the system behavior at its limit&lt;/li&gt;
&lt;li&gt;Tune the system to stretch its limits&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the action taken is to tune the system, tune, then repeat the breakpoint test to find where and whether the system limits moved.&lt;/p&gt;
&lt;p&gt;A team must determine the number of repetitions of the breakpoint test, how much the system can be tuned, and how far its limits can be tuned after each exercise.&lt;/p&gt;
]]></content><description>&lt;h1 id="breakpoint-testing">Breakpoint testing&lt;/h1>
&lt;p>Breakpoint testing aims to find system limits. Reasons you might want to know the limits include:&lt;/p>
&lt;ul>
&lt;li>To tune or care for the system&amp;rsquo;s weak spots to relocate those higher limits at higher levels.&lt;/li>
&lt;li>To help plan remediation steps in those cases and prepare for when the system nears those limits.&lt;/li>
&lt;/ul>
&lt;p>In other words, knowing where and how a system starts to fail helps prepare for such limits.&lt;/p></description></item></channel></rss>