<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Options on Grafana Labs</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/k6-options/</link><description>Recent content in Options on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/k6/v2.3.x/using-k6/k6-options/index.xml" rel="self" type="application/rss+xml"/><item><title>How to use options</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/k6-options/how-to/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/k6-options/how-to/</guid><content><![CDATA[&lt;h1 id=&#34;how-to-use-options&#34;&gt;How to use options&lt;/h1&gt;
&lt;p&gt;k6 provides multiple places to set options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In CLI flags&lt;/li&gt;
&lt;li&gt;In environment variables&lt;/li&gt;
&lt;li&gt;In the script &lt;code&gt;options&lt;/code&gt; object&lt;/li&gt;
&lt;li&gt;In a configuration file&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most likely, your use case will determine where you want to set the particular options for a particular test.
You can also access option values as your test runs.&lt;/p&gt;
&lt;h2 id=&#34;order-of-precedence&#34;&gt;Order of precedence&lt;/h2&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/order-of-precedence.png&#34;
  alt=&#34;Options passed as command-line flags override all other options: defaults &amp;lt; script options &amp;lt; environment variables &amp;lt; command-line flags&#34; width=&#34;616&#34;
     height=&#34;121&#34;/&gt;&lt;/p&gt;
&lt;p&gt;You can set options in multiple places.
If there are conflicts, k6 uses the option from the place with the highest &lt;em&gt;order of precedence&lt;/em&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;First, k6 uses the option&amp;rsquo;s default value.&lt;/li&gt;
&lt;li&gt;Next, k6 uses the options set in a configuration file via the &lt;code&gt;--config&lt;/code&gt; flag.&lt;/li&gt;
&lt;li&gt;Then, k6 uses the script value (if set).&lt;/li&gt;
&lt;li&gt;After, k6 uses the environment variable (if set).&lt;/li&gt;
&lt;li&gt;Finally, k6 takes the value from the CLI flag (if set).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That is, &lt;strong&gt;command-line flags have the highest order of precedence&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&#34;where-to-set-options&#34;&gt;Where to set options&lt;/h2&gt;
&lt;p&gt;Sometimes, how you set options is a matter of personal preference.
Other times, the context of your test dictates the most sensible place to put your options.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Options in the script to version control and keep tests tidy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The script &lt;code&gt;options&lt;/code&gt; object is generally the best place to put your options.
This provides automatic version control, allows for easy reuse, and lets you modularize your script.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;CLI flags to set options on the fly&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When you want to run a quick test, command-line flags are convenient.&lt;/p&gt;
&lt;p&gt;You can also use command-line flags to override files in your script (as determined by the &lt;a href=&#34;#order-of-precedence&#34;&gt;order of precedence&lt;/a&gt;).
For example, if your script file sets the test duration at 60 seconds, you could use a CLI flag to run a one-time shorter test.
With a flag like &lt;code&gt;--duration 30s&lt;/code&gt;, the test would be half as long but otherwise identical.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Environment variables to set options from your build chain&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For example, you could derive the option from a variable in your Docker container definition, CI UI, or vault—wherever you declare environment variables.&lt;/p&gt;
&lt;p&gt;The 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/reference/#block-hostnames&#34;&gt;block hostnames&lt;/a&gt; option is an example of an option that works well with environment variables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples-of-setting-options&#34;&gt;Examples of setting options&lt;/h2&gt;
&lt;p&gt;The following JS snippets show some examples of how you can set options.&lt;/p&gt;
&lt;h3 id=&#34;set-options-in-the-script&#34;&gt;Set options in the script&lt;/h3&gt;
&lt;!-- md-k6:skip --&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;;

export const options = {
  hosts: { &amp;#39;test.k6.io&amp;#39;: &amp;#39;1.2.3.4&amp;#39; },
  stages: [
    { duration: &amp;#39;1m&amp;#39;, target: 10 },
    { duration: &amp;#39;1m&amp;#39;, target: 20 },
    { duration: &amp;#39;1m&amp;#39;, target: 0 },
  ],
  thresholds: { http_req_duration: [&amp;#39;avg&amp;lt;100&amp;#39;, &amp;#39;p(95)&amp;lt;200&amp;#39;] },
  noConnectionReuse: true,
  userAgent: &amp;#39;MyK6UserAgentString/1.0&amp;#39;,
};

export default function () {
  http.get(&amp;#39;http://test.k6.io/&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;set-options-with-environment-variables&#34;&gt;Set options with environment variables&lt;/h3&gt;
&lt;p&gt;You can also set the options from the previous example through environment variables and command-line flags:&lt;/p&gt;



  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;Bash&#34;&gt;Bash&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;windows&#34;&gt;windows&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;powershell&#34;&gt;powershell&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#34;&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;Bash&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-bash&#34;&gt;K6_NO_CONNECTION_REUSE=true K6_USER_AGENT=&amp;#34;MyK6UserAgentString/1.0&amp;#34; k6 run script.js

k6 run --no-connection-reuse --user-agent &amp;#34;MyK6UserAgentString/1.0&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;windows&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-windows&#34;&gt;set &amp;#34;K6_NO_CONNECTION_REUSE=true&amp;#34; &amp;amp;&amp;amp; set &amp;#34;K6_USER_AGENT=MyK6UserAgentString/1.0&amp;#34; &amp;amp;&amp;amp; k6 run script.js

k6 run --no-connection-reuse --user-agent &amp;#34;MyK6UserAgentString/1.0&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;powershell&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-powershell&#34;&gt;$env:K6_NO_CONNECTION_REUSE=true; $env:K6_USER_AGENT=&amp;#34;MyK6UserAgentString/1.0&amp;#34;; k6 run script.js

k6 run --no-connection-reuse --user-agent &amp;#34;MyK6UserAgentString/1.0&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;h3 id=&#34;set-options-from-k6-variables&#34;&gt;Set options from k6 variables&lt;/h3&gt;
&lt;p&gt;With the &lt;code&gt;--env&lt;/code&gt; flag, you can use the CLI to define k6 variables.
Then, you can use the variable to dynamically define an option&amp;rsquo;s value in the script file.&lt;/p&gt;
&lt;p&gt;For example, you could define a variable for your user agent like this:&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;Bash&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-bash&#34;&gt;k6 run script.js --env MY_USER_AGENT=&amp;#34;hello&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Then, your script could then set the &lt;code&gt;userAgent&lt;/code&gt; option based on the variable&amp;rsquo;s value.
This allows for quick configuration.&lt;/p&gt;
&lt;!-- md-k6:skip --&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;;

export const options = {
  userAgent: __ENV.MY_USER_AGENT,
};

export default function () {
  http.get(&amp;#39;http://test.k6.io/&amp;#39;);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Though this method uses the &lt;code&gt;--env&lt;/code&gt; flag, this is not the same as using an environment variable.
For an explanation, refer to the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/environment-variables/&#34;&gt;environment variables document&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;set-options-with-the-config-flag&#34;&gt;Set options with the &amp;ndash;config flag&lt;/h3&gt;
&lt;p&gt;k6 includes a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/reference/#config&#34;&gt;default configuration file&lt;/a&gt; that you can edit, or you can create a new file and then use a CLI flag to point to that file.
If you use it, the options take the &lt;em&gt;second lowest order of precedence&lt;/em&gt; (after defaults).
If you set options anywhere else, they will override the &lt;code&gt;--config&lt;/code&gt; flag options.&lt;/p&gt;
&lt;p&gt;Use the &lt;code&gt;--config&lt;/code&gt; flag to declare the file path to your options.&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;Bash&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-bash&#34;&gt;k6 run --config options.json script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command would set test options according to the values in the &lt;code&gt;options.json&lt;/code&gt; file.&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;JSON&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-json&#34;&gt;{
  &amp;#34;hosts&amp;#34;: {
    &amp;#34;test.k6.io&amp;#34;: &amp;#34;1.2.3.4&amp;#34;
  },
  &amp;#34;stages&amp;#34;: [
    {
      &amp;#34;duration&amp;#34;: &amp;#34;1m&amp;#34;,
      &amp;#34;target&amp;#34;: 10
    },
    {
      &amp;#34;duration&amp;#34;: &amp;#34;1m&amp;#34;,
      &amp;#34;target&amp;#34;: 30
    },
    {
      &amp;#34;duration&amp;#34;: &amp;#34;1m&amp;#34;,
      &amp;#34;target&amp;#34;: 0
    }
  ],
  &amp;#34;thresholds&amp;#34;: {
    &amp;#34;http_req_duration&amp;#34;: [&amp;#34;avg&amp;lt;100&amp;#34;, &amp;#34;p(95)&amp;lt;200&amp;#34;]
  },
  &amp;#34;noConnectionReuse&amp;#34;: true,
  &amp;#34;userAgent&amp;#34;: &amp;#34;MyK6UserAgentString/1.0&amp;#34;
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For an alternative way to separate configuration from logic, you can use the &lt;code&gt;JSON.parse()&lt;/code&gt; method in your script file:&lt;/p&gt;
&lt;!-- md-k6:skip --&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;// load test config, used to populate exported options object:
const testConfig = JSON.parse(open(&amp;#39;./config/test.json&amp;#39;));
// combine the above with options set directly:
export const options = testConfig;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;get-an-option-value-from-the-script&#34;&gt;Get an option value from the script&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;k6/execution&lt;/code&gt; API provides a 
    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-execution/#test&#34;&gt;test.options&lt;/a&gt; object.
With &lt;code&gt;test.options&lt;/code&gt;, you can access the consolidated and derived options of your script as the test runs.&lt;/p&gt;
&lt;p&gt;A common use of this feature is to log the value of a tag, but there are many possibilities.
For example, this script accesses the value of the test&amp;rsquo;s current stage:&lt;/p&gt;
&lt;!-- md-k6:skip --&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 exec from &amp;#39;k6/execution&amp;#39;;

export const options = {
  stages: [
    { duration: &amp;#39;5s&amp;#39;, target: 100 },
    { duration: &amp;#39;5s&amp;#39;, target: 50 },
  ],
};

export default function () {
  console.log(exec.test.options.scenarios.default.stages[0].target); // 100
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
]]></content><description>&lt;h1 id="how-to-use-options">How to use options&lt;/h1>
&lt;p>k6 provides multiple places to set options:&lt;/p>
&lt;ul>
&lt;li>In CLI flags&lt;/li>
&lt;li>In environment variables&lt;/li>
&lt;li>In the script &lt;code>options&lt;/code> object&lt;/li>
&lt;li>In a configuration file&lt;/li>
&lt;/ul>
&lt;p>Most likely, your use case will determine where you want to set the particular options for a particular test.
You can also access option values as your test runs.&lt;/p></description></item><item><title>Options reference</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/k6-options/reference/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/k6-options/reference/</guid><content><![CDATA[&lt;h1 id=&#34;options-reference&#34;&gt;Options reference&lt;/h1&gt;
&lt;!-- md-k6:skipall --&gt;
&lt;p&gt;Options define test-run behavior.
Most options can be passed in multiple places.
If an option is defined in multiple places, k6 chooses the value from the highest 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/how-to/#order-of-precedence&#34;&gt;order of precedence&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;quick-reference-of-options&#34;&gt;Quick reference of options&lt;/h2&gt;
&lt;p&gt;Each option has its own detailed reference in a separate section.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Option&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#address&#34;&gt;Address&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Address of the REST API server&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#batch&#34;&gt;Batch&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Max number of simultaneous connections of a &lt;code&gt;http.batch()&lt;/code&gt; call&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#batch-per-host&#34;&gt;Batch per host&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Max number of simultaneous connections of a &lt;code&gt;http.batch()&lt;/code&gt; call for a host&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#blacklist-ip&#34;&gt;Blacklist IP&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Blacklist IP ranges from being called&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#block-hostnames&#34;&gt;Block hostnames&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Block any requests to specific hostnames&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#compatibility-mode&#34;&gt;Compatibility mode&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Support running scripts with different ECMAScript modes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#config&#34;&gt;Config&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify the config file in JSON format to read the options values&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#console-output&#34;&gt;Console output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Redirects logs logged by &lt;code&gt;console&lt;/code&gt; methods to the provided output file&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#discard-response-bodies&#34;&gt;Discard response bodies&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify whether response bodies should be discarded&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#dns&#34;&gt;DNS&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure DNS resolution behavior&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#dependency-manifest&#34;&gt;Dependency manifest&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify a dependency manifest file to validate dependencies against before running the test&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#duration&#34;&gt;Duration&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A string specifying the total duration of the test run; together with the &lt;a href=&#34;#vus&#34;&gt;vus option&lt;/a&gt;, it&amp;rsquo;s a shortcut for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/constant-vus/&#34;&gt;constant VUs executor&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#execution-segment&#34;&gt;Execution segment&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Limit execution to a segment of the total test&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#exit-on-running&#34;&gt;Exit on running&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Exits when test reaches the running status&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#cloud-options&#34;&gt;Cloud options&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;An object used to set configuration options for cloud parameters.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#features&#34;&gt;Features&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enable 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/feature-flags/&#34;&gt;feature flags&lt;/a&gt; to opt in to new, not-yet-stable behavior&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#handle-summary-timeout&#34;&gt;Handle summary timeout&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify how long the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;handleSummary()&lt;/a&gt; function is allowed to run before it&amp;rsquo;s terminated&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#hosts&#34;&gt;Hosts&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;An object with overrides to DNS resolution&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#http-debug&#34;&gt;HTTP debug&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Log all HTTP requests and responses&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#include-system-env-vars&#34;&gt;Include system Env vars&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Pass the real system environment variables to the runtime&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#insecure-skip-tls-verify&#34;&gt;Insecure skip TLS verify&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether k6 should ignore TLS verifications for connections established from code&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#iterations&#34;&gt;Iterations&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A number specifying a fixed number of iterations to execute of the script; together with the &lt;a href=&#34;#vus&#34;&gt;vus option&lt;/a&gt;, it&amp;rsquo;s a shortcut for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/shared-iterations/&#34;&gt;shared iterations executor&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#linger&#34;&gt;Linger&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether k6 should linger around after test run completion&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#local-ips&#34;&gt;Local IPs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of local IPs, IP ranges, and CIDRs from which VUs will make requests&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#log-output&#34;&gt;Log output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration about where logs from k6 should be send&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#log-nanosecond-timestamps&#34;&gt;Log nanosecond timestamps&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether log timestamps use nanosecond instead of second precision&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#logformat&#34;&gt;LogFormat&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify the format of the log output&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#max-redirects&#34;&gt;Max redirects&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of HTTP redirects that k6 will follow&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#minimum-iteration-duration&#34;&gt;Minimum iteration duration&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify the minimum duration for every single execution&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-color&#34;&gt;No color&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether colored output is disabled&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-connection-reuse&#34;&gt;No connection reuse&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether k6 should disable keep-alive connections&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-cookies-reset&#34;&gt;No cookies reset&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;This disables resetting the cookie jar after each VU iteration&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-setup&#34;&gt;No setup&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether &lt;code&gt;setup()&lt;/code&gt; function should be run&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-teardown&#34;&gt;No teardown&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether &lt;code&gt;teardown()&lt;/code&gt; function should be run&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-thresholds&#34;&gt;No thresholds&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Disables threshold execution&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-usage-report&#34;&gt;No usage report&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether k6 should send a usage report&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#no-vu-connection-reuse&#34;&gt;No VU connection reuse&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether k6 should reuse TCP connections&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#once&#34;&gt;Once&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Run one iteration with one VU while preserving a single scenario&amp;rsquo;s function and settings.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#paused&#34;&gt;Paused&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether the test should start in a paused state&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#profiling-enabled&#34;&gt;Profiling Enabled&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Enables profiling endpoints&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#quiet&#34;&gt;Quiet&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether to show the progress update in the console or not&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#results-output&#34;&gt;Results output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify the results output&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#rps&#34;&gt;RPS&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;The maximum number of requests to make per second globally (discouraged, use 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/concepts/open-vs-closed/&#34;&gt;arrival-rate executors&lt;/a&gt; instead)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scenario-selection&#34;&gt;Scenario selection&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Select configured scenarios to run without changing their settings.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#scenarios&#34;&gt;Scenarios&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Define advanced execution scenarios&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#secret-source&#34;&gt;Secret Sources&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify source of secrets to be used within k6.&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#setup-timeout&#34;&gt;Setup timeout&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify how long the &lt;code&gt;setup()&lt;/code&gt; function is allow to run before it&amp;rsquo;s terminated&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#show-logs&#34;&gt;Show logs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether the cloud logs are printed out to the terminal&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#stages&#34;&gt;Stages&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of objects that specify the target number of VUs to ramp up or down; shortcut option for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/ramping-vus/&#34;&gt;ramping VUs executor&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#supply-environment-variables&#34;&gt;Supply environment variable&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Add/override environment variable with &lt;code&gt;VAR=value&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#system-tags&#34;&gt;System tags&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify which System Tags will be in the collected metrics&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#summary-export&#34;&gt;Summary export&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Output the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt; report to a JSON file (discouraged, use 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;handleSummary()&lt;/a&gt; instead)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#summary-mode&#34;&gt;Summary mode&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Define how detailed the end-of-test summary should be&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#summary-trend-stats&#34;&gt;Summary trend stats&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Define stats for trend metrics in the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#summary-time-unit&#34;&gt;Summary time unit&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Time unit to be used for &lt;em&gt;all&lt;/em&gt; time values in the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tags&#34;&gt;Tags&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify tags that should be set test-wide across all metrics&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#teardown-timeout&#34;&gt;Teardown timeout&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Specify how long the teardown() function is allowed to run before it&amp;rsquo;s terminated&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#thresholds&#34;&gt;Thresholds&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configure under what conditions a test is successful or not&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#throw&#34;&gt;Throw&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether to throw errors on failed HTTP requests&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-aia-fetch&#34;&gt;TLS AIA fetch&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean that lets k6 fetch missing intermediate CA certificates via the Authority Information Access (AIA) extension&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-auth&#34;&gt;TLS auth&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of TLS client certificate configuration objects&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-cipher-suites&#34;&gt;TLS cipher suites&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A list of cipher suites allowed to be used by in SSL/TLS interactions with a server&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#tls-version&#34;&gt;TLS version&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;String or object representing the only SSL/TLS version allowed&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#traces-output&#34;&gt;Traces output&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;Configuration about where traces from k6 should be sent&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#user-agent&#34;&gt;User agent&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A string specifying the User-Agent header when sending HTTP requests&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#verbose&#34;&gt;Verbose&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A boolean specifying whether verbose logging is enabled&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;a href=&#34;#vus&#34;&gt;VUs&lt;/a&gt;&lt;/td&gt;
              &lt;td&gt;A number specifying the number of VUs to run concurrently&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following sections detail all available options that you can be specify within a script.&lt;/p&gt;
&lt;p&gt;It also documents the equivalent command line flag, environment variables or option when executing &lt;code&gt;k6 run ...&lt;/code&gt;
and &lt;code&gt;k6 cloud run ...&lt;/code&gt;, which you can use to override options specified in the code.&lt;/p&gt;
&lt;h2 id=&#34;address&#34;&gt;Address&lt;/h2&gt;
&lt;p&gt;Address of the API server. When set, k6 starts an HTTP server with a REST API that can be used to
control some of the parameters of the test execution.&lt;/p&gt;
&lt;p&gt;Starting in k6 v2.0.0, the REST API server is &lt;strong&gt;off by default&lt;/strong&gt;. To enable it, pass &lt;code&gt;--address&lt;/code&gt;
(or set &lt;code&gt;K6_ADDRESS&lt;/code&gt;) with the address you want it to listen on. Read more on

    &lt;a href=&#34;/docs/k6/v2.3.x/reference/k6-rest-api/&#34;&gt;k6 REST API&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_ADDRESS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--address&lt;/code&gt;, &lt;code&gt;-a&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;em&gt;(unset; server disabled)&lt;/em&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --address &amp;#34;localhost:6565&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;batch&#34;&gt;Batch&lt;/h2&gt;
&lt;p&gt;The maximum number of simultaneous/parallel connections in total that an

    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-http/batch/&#34;&gt;&lt;code&gt;http.batch()&lt;/code&gt;&lt;/a&gt; call in a VU can make. If you have a
&lt;code&gt;batch()&lt;/code&gt; call that you&amp;rsquo;ve given 20 URLs to and &lt;code&gt;--batch&lt;/code&gt; is set to 15, then the VU will make 15
requests right away in parallel and queue the rest, executing them as soon as a previous request is
done and a slot opens. Available in both the &lt;code&gt;k6 run&lt;/code&gt; and the &lt;code&gt;k6 cloud run&lt;/code&gt; commands&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_BATCH&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--batch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;batch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;20&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  batch: 15,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;batch-per-host&#34;&gt;Batch per host&lt;/h2&gt;
&lt;p&gt;The maximum number of simultaneous/parallel connections for the same hostname that an

    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-http/batch/&#34;&gt;&lt;code&gt;http.batch()&lt;/code&gt;&lt;/a&gt; call in a VU can make. If you have a
&lt;code&gt;batch()&lt;/code&gt; call that you&amp;rsquo;ve given 20 URLs to the &lt;em&gt;same&lt;/em&gt; hostname and &lt;code&gt;--batch-per-host&lt;/code&gt; is set to 5, then the VU will make 5
requests right away in parallel and queue the rest, executing them as soon as a previous request is
done and a slot opens. This will not run more request in parallel then the value of &lt;code&gt;batch&lt;/code&gt;. Available in both the &lt;code&gt;k6 run&lt;/code&gt; and the &lt;code&gt;k6 cloud run&lt;/code&gt; commands&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_BATCH_PER_HOST&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--batch-per-host&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;batchPerHost&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;6&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  batchPerHost: 5,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;blacklist-ip&#34;&gt;Blacklist IP&lt;/h2&gt;
&lt;p&gt;Blacklist IP ranges from being called. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_BLACKLIST_IPS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--blacklist-ip&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;blacklistIPs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  blacklistIPs: [&amp;#39;10.0.0.0/8&amp;#39;],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;block-hostnames&#34;&gt;Block hostnames&lt;/h2&gt;
&lt;p&gt;Blocks hostnames based on a list of glob match strings. The pattern matching string can have a single
&lt;code&gt;*&lt;/code&gt; at the beginning such as &lt;code&gt;*.example.com&lt;/code&gt; that will match anything before that such as
&lt;code&gt;test.example.com&lt;/code&gt; and &lt;code&gt;test.test.example.com&lt;/code&gt;.
Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_BLOCK_HOSTNAMES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--block-hostnames&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;blockHostnames&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  blockHostnames: [&amp;#39;test.k6.io&amp;#39;, &amp;#39;*.example.com&amp;#39;],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;Bash&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-bash&#34;&gt;k6 run --block-hostnames=&amp;#34;test.k6.io,*.example.com&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;compatibility-mode&#34;&gt;Compatibility mode&lt;/h2&gt;
&lt;p&gt;Support running scripts with different ECMAScript compatibility modes.&lt;/p&gt;
&lt;p&gt;Read about the different modes on the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/javascript-compatibility-mode/&#34;&gt;JavaScript Compatibility Mode documentation&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_COMPATIBILITY_MODE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--compatibility-mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;extended&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --compatibility-mode=base script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;config&#34;&gt;Config&lt;/h2&gt;
&lt;p&gt;Specify the config file in JSON format.
If the config file is not specified, k6 looks for &lt;code&gt;config.json&lt;/code&gt; in the &lt;code&gt;k6/&lt;/code&gt; directory inside the regular directory for configuration files on the operating system.
Default config locations on different operating systems are as follows:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;OS&lt;/th&gt;
              &lt;th&gt;Default Config Path&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Unix-based&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;${HOME}/.config/k6/config.json&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;macOS&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;${HOME}/Library/Application Support/k6/config.json&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Windows&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;%AppData%/k6/config.json&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--config &amp;lt;path&amp;gt;&lt;/code&gt;, &lt;code&gt;-c &amp;lt;path&amp;gt;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;When running tests in k6 Cloud and using a non-default config.json file,
specify the cloud token inside your config file to authenticate.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;console-output&#34;&gt;Console output&lt;/h2&gt;
&lt;p&gt;Redirects logs logged by &lt;code&gt;console&lt;/code&gt; methods to the provided output file. Available in &lt;code&gt;k6 cloud run&lt;/code&gt; and &lt;code&gt;k6 run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_CONSOLE_OUTPUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--console-output&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --console-output &amp;#34;loadtest.log&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;discard-response-bodies&#34;&gt;Discard response bodies&lt;/h2&gt;
&lt;p&gt;Specify if response bodies should be discarded by changing the default value of

    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-http/params/&#34;&gt;responseType&lt;/a&gt; to &lt;code&gt;none&lt;/code&gt; for all HTTP requests. Highly recommended to be set
to &lt;code&gt;true&lt;/code&gt; and then only for the requests where the response body is needed for scripting
to set 
    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-http/params/&#34;&gt;responseType&lt;/a&gt; to &lt;code&gt;text&lt;/code&gt; or &lt;code&gt;binary&lt;/code&gt;. Lessens the amount of memory
required and the amount of GC - reducing the load on the testing machine, and probably producing
more reliable test results.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_DISCARD_RESPONSE_BODIES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--discard-response-bodies&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;discardResponseBodies&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  discardResponseBodies: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;dns&#34;&gt;DNS&lt;/h2&gt;
&lt;p&gt;This is a composite option that provides control of DNS resolution behavior with
configuration for cache expiration (TTL), IP selection strategy and IP version
preference. The TTL field in the DNS record is currently not read by k6, so the
&lt;code&gt;ttl&lt;/code&gt; option allows manual control over this behavior, albeit as a fixed value
for the duration of the test run.&lt;/p&gt;
&lt;p&gt;Note that DNS resolution is done only on new HTTP connections, and by default k6
will try to reuse connections if HTTP keep-alive is supported. To force a certain
DNS behavior consider enabling the &lt;a href=&#34;#no-connection-reuse&#34;&gt;&lt;code&gt;noConnectionReuse&lt;/code&gt;&lt;/a&gt;
option in your tests.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_DNS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--dns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;dns&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;ttl=5m,select=random,policy=preferIPv4&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Possible &lt;code&gt;ttl&lt;/code&gt; values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;0&lt;/code&gt;: no caching at all - each request will trigger a new DNS lookup.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;inf&lt;/code&gt;: cache any resolved IPs for the duration of the test run.&lt;/li&gt;
&lt;li&gt;any time duration like &lt;code&gt;60s&lt;/code&gt;, &lt;code&gt;5m30s&lt;/code&gt;, &lt;code&gt;10m&lt;/code&gt;, &lt;code&gt;2h&lt;/code&gt;, etc.; if no unit is specified (e.g. &lt;code&gt;ttl=3000&lt;/code&gt;), k6 assumes milliseconds.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Possible &lt;code&gt;select&lt;/code&gt; values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;first&lt;/code&gt;: always pick the first resolved IP.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;random&lt;/code&gt;: pick a random IP for every new connection.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;roundRobin&lt;/code&gt;: iterate sequentially over the resolved IPs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Possible &lt;code&gt;policy&lt;/code&gt; values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;preferIPv4&lt;/code&gt;: use IPv4 addresses if available, otherwise fall back to IPv6.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;preferIPv6&lt;/code&gt;: use IPv6 addresses if available, otherwise fall back to IPv4.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onlyIPv4&lt;/code&gt;: only use IPv4 addresses, ignore any IPv6 ones.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;onlyIPv6&lt;/code&gt;: only use IPv6 addresses, ignore any IPv4 ones.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;any&lt;/code&gt;: no preference, use all addresses.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are some configuration examples:&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;Bash&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-bash&#34;&gt;K6_DNS=&amp;#34;ttl=5m,select=random,policy=preferIPv4&amp;#34; k6 cloud run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;export const options = {
  dns: {
    ttl: &amp;#39;1m&amp;#39;,
    select: &amp;#39;roundRobin&amp;#39;,
    policy: &amp;#39;any&amp;#39;,
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;dependency-manifest&#34;&gt;Dependency manifest&lt;/h2&gt;
&lt;p&gt;Specify a dependency manifest as JSON to set default constraints for k6 extensions and k6 itself used in your test script. When you provide a dependency manifest, k6 uses it to set default constraints for k6 extensions that are used in the script but don&amp;rsquo;t have concrete constraints specified.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_DEPENDENCY_MANIFEST&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The &lt;code&gt;K6_DEPENDENCY_MANIFEST&lt;/code&gt; environment variable contains the JSON manifest content itself as a simple key-value object, not a path to a file.&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;Bash&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-bash&#34;&gt;K6_DEPENDENCY_MANIFEST=&amp;#39;{&amp;#34;k6&amp;#34;:&amp;#34;v1.6.0&amp;#34;,&amp;#34;k6/x/faker&amp;#34;:&amp;#34;v0.4.4&amp;#34;}&amp;#39; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The dependency manifest is a JSON object with key-value pairs mapping k6 extension names (or &lt;code&gt;k6&lt;/code&gt; itself) to version constraints. For example, &lt;code&gt;{&amp;quot;k6&amp;quot;:&amp;quot;v1.6.0&amp;quot;,&amp;quot;k6/x/faker&amp;quot;:&amp;quot;v0.4.4&amp;quot;}&lt;/code&gt;. For k6 extensions that don&amp;rsquo;t have explicit version constraints in your script, the manifest provides default constraints to ensure consistent resolution.&lt;/p&gt;
&lt;p&gt;For more information about generating and using dependency manifests, refer to the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-deps-command/&#34;&gt;&lt;code&gt;k6 deps&lt;/code&gt; command documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;duration&#34;&gt;Duration&lt;/h2&gt;
&lt;p&gt;A string specifying the total duration a test run should be run for. During this time each
VU will execute the script in a loop. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;p&gt;Together with the &lt;a href=&#34;#vus&#34;&gt;&lt;code&gt;vus&lt;/code&gt; option&lt;/a&gt;, &lt;code&gt;duration&lt;/code&gt; is a shortcut for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/constant-vus/&#34;&gt;constant VUs executor&lt;/a&gt;.&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;For a smoke or functional test that runs once, use &lt;a href=&#34;#once&#34;&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/a&gt;. It runs one iteration with one VU and preserves a single scenario&amp;rsquo;s function and settings, including browser options. &lt;code&gt;--duration&lt;/code&gt; sets a time-based load and can replace the script&amp;rsquo;s scenario configuration.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_DURATION&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--duration&lt;/code&gt;, &lt;code&gt;-d&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  vus: 100,
  duration: &amp;#39;3m&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;cloud-options&#34;&gt;Cloud options&lt;/h2&gt;
&lt;p&gt;An object used to set configuration options for Grafana Cloud k6. For more information about available parameters, refer to &lt;a href=&#34;/docs/grafana-cloud/testing/k6/author-run/cloud-scripting-extras/cloud-options/&#34;&gt;Cloud options&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;cloud&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;This is an example of how to specify the test name (test runs/executions with the same name will be
logically grouped for trending and comparison) when streaming results to
&lt;a href=&#34;/docs/grafana-cloud/testing/k6/&#34;&gt;Grafana Cloud k6&lt;/a&gt;.&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;export const options = {
  cloud: {
    name: &amp;#39;My test name&amp;#39;,
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;execution-segment&#34;&gt;Execution segment&lt;/h2&gt;
&lt;p&gt;These options specify how to partition the test run and which segment to run.
If defined, k6 will scale the number of VUs and iterations to be run for that
segment, which is useful in distributed execution. Available in &lt;code&gt;k6 run&lt;/code&gt; and
&lt;code&gt;k6 cloud run&lt;/code&gt; commands.&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;To run the script once with one VU, use &lt;a href=&#34;#once&#34;&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/a&gt; instead of dividing the test into execution segments. &lt;code&gt;--once&lt;/code&gt; preserves a single scenario&amp;rsquo;s behavior and browser settings, and cannot be combined with &lt;code&gt;--execution-segment&lt;/code&gt; or &lt;code&gt;--execution-segment-sequence&lt;/code&gt;.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--execution-segment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;executionSegment&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0:1&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--execution-segment-sequence&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;executionSegmentSequence&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;0,1&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For example, to run 25% of a test, you would specify &lt;code&gt;--execution-segment &#39;25%&#39;&lt;/code&gt;,
which would be equivalent to &lt;code&gt;--execution-segment &#39;0:1/4&#39;&lt;/code&gt;, i.e. run the first
1/4 of the test.
To ensure that each instance executes a specific segment, also specify the full
segment sequence, e.g. &lt;code&gt;--execution-segment-sequence &#39;0,1/4,1/2,1&#39;&lt;/code&gt;.
This way one instance could run with &lt;code&gt;--execution-segment &#39;0:1/4&#39;&lt;/code&gt;, another with
&lt;code&gt;--execution-segment &#39;1/4:1/2&#39;&lt;/code&gt;, etc. and there would be no overlap between them.&lt;/p&gt;
&lt;!-- TODO: Add more examples, link to a standalone page? --&gt;
&lt;h2 id=&#34;exit-on-running&#34;&gt;Exit on running&lt;/h2&gt;
&lt;p&gt;A boolean, specifying whether the script should exit once the test status reaches &lt;code&gt;running&lt;/code&gt;.
When running scripts with &lt;code&gt;k6 cloud run&lt;/code&gt; by default scripts will run until the test reaches a finalized status.
This could be problematic in certain environments (think of Continuous Integration and Delivery pipelines),
since you&amp;rsquo;d need to wait until the test ends up in a finalized state.&lt;/p&gt;
&lt;p&gt;With this option, you can exit early and let the script run in the background. Available in &lt;code&gt;k6 cloud run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_EXIT_ON_RUNNING&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--exit-on-running&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 cloud run --exit-on-running script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;features&#34;&gt;Features&lt;/h2&gt;
&lt;p&gt;Enable 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/feature-flags/&#34;&gt;feature flags&lt;/a&gt; to opt in to new, not-yet-stable behavior. Available in the &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands. Unlike most options on this page, feature flags can&amp;rsquo;t be set in the script&amp;rsquo;s &lt;code&gt;options&lt;/code&gt; object: use the command-line flag, the environment variable, or the &lt;code&gt;features&lt;/code&gt; key in the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/how-to/#set-options-with-the---config-flag&#34;&gt;JSON configuration file&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_FEATURES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--features&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;features&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --features native-histograms script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;handle-summary-timeout&#34;&gt;Handle summary timeout&lt;/h2&gt;
&lt;p&gt;Specify how long the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;handleSummary()&lt;/a&gt; function is allowed to run before it&amp;rsquo;s terminated. If defined, the value must be positive.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_HANDLE_SUMMARY_TIMEOUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;handleSummaryTimeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;120s&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  handleSummaryTimeout: &amp;#39;30s&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;hosts&#34;&gt;Hosts&lt;/h2&gt;
&lt;p&gt;An object with overrides to DNS resolution, similar to what you can do with &lt;code&gt;/etc/hosts&lt;/code&gt; on
Linux/Unix or &lt;code&gt;C:\Windows\System32\drivers\etc\hosts&lt;/code&gt; on Windows. For instance, you could set
up an override which routes all requests for &lt;code&gt;test.k6.io&lt;/code&gt; to &lt;code&gt;1.2.3.4&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;k6 also supports ways to narrow or widen the scope of your redirects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can redirect only from or to certain ports.&lt;/li&gt;
&lt;li&gt;Starting from v0.42.0, you can use an asterisk (&lt;code&gt;*&lt;/code&gt;) as a wild card at the start of the host name to avoid repetition. For example, &lt;code&gt;*.k6.io&lt;/code&gt; would apply the override for all subdomains of &lt;code&gt;k6.io&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&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;This does not modify the actual HTTP &lt;code&gt;Host&lt;/code&gt; header, but rather where it will be routed.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;hosts&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  hosts: {
    &amp;#39;test.k6.io&amp;#39;: &amp;#39;1.2.3.4&amp;#39;,
    &amp;#39;test.k6.io:443&amp;#39;: &amp;#39;1.2.3.4:8443&amp;#39;,
    &amp;#39;*.grafana.com&amp;#39;: &amp;#39;1.2.3.4&amp;#39;,
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The preceding code will redirect requests made to &lt;code&gt;test.k6.io&lt;/code&gt; to &lt;code&gt;1.2.3.4&lt;/code&gt;, keeping the same port. If the request is done to port &lt;code&gt;443&lt;/code&gt;, it will redirect it to port &lt;code&gt;8443&lt;/code&gt; instead. It will also redirect requests to any subdomain of &lt;code&gt;grafana.com&lt;/code&gt; to &lt;code&gt;1.2.3.4&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;http-debug&#34;&gt;HTTP debug&lt;/h2&gt;
&lt;p&gt;Log all HTTP requests and responses. Excludes body by default, to include body use
&lt;code&gt;--http-debug=full&lt;/code&gt;. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;p&gt;Read more 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/http-debugging/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_HTTP_DEBUG&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--http-debug&lt;/code&gt;,&lt;br/&gt;&lt;code&gt;--http-debug=full&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;httpDebug&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  httpDebug: &amp;#39;full&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;include-system-env-vars&#34;&gt;Include system env vars&lt;/h2&gt;
&lt;p&gt;Pass the real system 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/environment-variables/&#34;&gt;environment variables&lt;/a&gt; to the runtime. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--include-system-env-vars&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt; for &lt;code&gt;k6 run&lt;/code&gt;, but &lt;code&gt;false&lt;/code&gt; for all other commands to prevent inadvertent sensitive data leaks.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --include-system-env-vars ~/script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;insecure-skip-tls-verify&#34;&gt;Insecure skip TLS verify&lt;/h2&gt;
&lt;p&gt;A boolean, true or false. When this option is enabled (set to true), all of the verifications that
would otherwise be done to establish trust in a server provided TLS certificate will be ignored.
This only applies to connections created from code, such as HTTP requests.
Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_INSECURE_SKIP_TLS_VERIFY&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--insecure-skip-tls-verify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;insecureSkipTLSVerify&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  insecureSkipTLSVerify: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;iterations&#34;&gt;Iterations&lt;/h2&gt;
&lt;p&gt;An integer value, specifying the total number of iterations of the &lt;code&gt;default&lt;/code&gt; function to execute in the test run, as opposed to specifying a duration of time during which the script would run in a loop. Available both in the &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;p&gt;Together with the &lt;a href=&#34;#vus&#34;&gt;&lt;code&gt;vus&lt;/code&gt; option&lt;/a&gt;, &lt;code&gt;iterations&lt;/code&gt; is a shortcut for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/shared-iterations/&#34;&gt;shared iterations executor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By default, the maximum duration of a &lt;code&gt;shared-iterations&lt;/code&gt; scenario is 10 minutes. You can adjust that time via the &lt;code&gt;maxDuration&lt;/code&gt; option of the scenario, or by also specifying the &lt;a href=&#34;#duration&#34;&gt;&lt;code&gt;duration&lt;/code&gt; global shortcut option&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note that iterations aren&amp;rsquo;t fairly distributed with this option, and a VU that executes faster will complete more iterations than others.&lt;/strong&gt; Each VU will try to complete as many iterations as possible, &lt;a href=&#34;https://en.wikipedia.org/wiki/Work_stealing&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&amp;ldquo;stealing&amp;rdquo;&lt;/a&gt; them from the total number of iterations for the test. So, depending on iteration times, some VUs may complete more iterations than others. If you want guarantees that every VU will complete a specific, fixed number of iterations, 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/per-vu-iterations/&#34;&gt;use the per-VU iterations executor&lt;/a&gt;.&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;To run an existing script once, use &lt;a href=&#34;#once&#34;&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/a&gt; instead of &lt;code&gt;--vus 1 --iterations 1&lt;/code&gt;. It preserves a single scenario&amp;rsquo;s function, environment variables, tags, and browser options. The shortcut flags can replace the script&amp;rsquo;s scenarios with a &lt;code&gt;default&lt;/code&gt; scenario and lose those settings.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_ITERATIONS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--iterations&lt;/code&gt;, &lt;code&gt;-i&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;iterations&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  vus: 5,
  iterations: 10,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Or, to run 10 VUs 10 times each:&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;export const options = {
  vus: 10,
  iterations: 100,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;linger&#34;&gt;Linger&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, specifying whether the k6 process should linger around after test
run completion. Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_LINGER&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--linger&lt;/code&gt;, &lt;code&gt;-l&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;linger&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  linger: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;local-ips&#34;&gt;Local IPs&lt;/h2&gt;
&lt;p&gt;A list of IPs, IP ranges and CIDRs from which VUs will make requests. The IPs will be sequentially
given out to VUs. This option doesn&amp;rsquo;t change anything on the OS level so the IPs need to be already
configured on the OS level for k6 to use them. Also IPv4 CIDRs with more than 2
IPs don&amp;rsquo;t include the first and last IP as they are reserved for referring to the network itself and
the broadcast address respectively.&lt;/p&gt;
&lt;p&gt;This option can be used for splitting the network traffic from k6 between multiple network cards, thus potentially increasing the available network throughput. For example, if you have 2 NICs, you can run k6 with &lt;code&gt;--local-ips=&amp;quot;&amp;lt;IP-from-first-NIC&amp;gt;,&amp;lt;IP-from-second-NIC&amp;gt;&amp;quot;&lt;/code&gt; to balance the traffic equally between them - half of the VUs will use the first IP and the other half will use the second. This can scale to any number of NICs, and you can repeat some local IPs to give them more traffic. For example, &lt;code&gt;--local-ips=&amp;quot;&amp;lt;IP1&amp;gt;,&amp;lt;IP2&amp;gt;,&amp;lt;IP3&amp;gt;,&amp;lt;IP3&amp;gt;&amp;quot;&lt;/code&gt; will split VUs between 3 different source IPs in a 25%:25%:50% ratio.&lt;/p&gt;
&lt;p&gt;Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_LOCAL_IPS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--local-ips&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --local-ips=192.168.20.12-192.168.20.15,192.168.10.0/27 script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;log-output&#34;&gt;Log output&lt;/h2&gt;
&lt;p&gt;This option specifies where to send logs to and another configuration connected to it. Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_LOG_OUTPUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--log-output&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;stderr&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --log-output=stdout script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Possible values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;none - disable&lt;/li&gt;
&lt;li&gt;stdout - send to the standard output&lt;/li&gt;
&lt;li&gt;stderr - send to the standard error output (this is the default)&lt;/li&gt;
&lt;li&gt;loki - send logs to a loki server&lt;/li&gt;
&lt;li&gt;file - write logs to a file&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;loki&#34;&gt;Loki&lt;/h3&gt;
&lt;p&gt;Use the &lt;code&gt;log-output&lt;/code&gt; option to configure &lt;a href=&#34;/oss/loki/&#34;&gt;Loki&lt;/a&gt; as follows.
For additional instructions and a step-by-step guide, check out the &lt;a href=&#34;https://k6.io/blog/using-loki-to-store-and-query-k6-logs/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Loki tutorial&lt;/a&gt;.&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;Bash&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-bash&#34;&gt;k6 run --log-output=loki=http://127.0.0.1:3100/loki/api/v1/push,label.something=else,label.foo=bar,limit=32,level=info,pushPeriod=5m32s,msgMaxSize=1231 script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Where all but the url in the beginning are not required.
The possible keys with their meanings and default values:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;key&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nothing&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;the endpoint to which to send logs&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://127.0.0.1:3100/loki/api/v1/push&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;allowedLabels&lt;/td&gt;
              &lt;td&gt;if set k6 will send only the provided labels as such and all others will be appended to the message in the form &lt;code&gt;key=value&lt;/code&gt;. The value of the option is in the form &lt;code&gt;[label1,label2]&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;label.&lt;code&gt;labelName&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;adds an additional label with the provided key and value to each message&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;header.&lt;code&gt;headerName&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;adds an additional HTTP header with the provided header name and value to each HTTP request made to Loki&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;limit&lt;/td&gt;
              &lt;td&gt;the limit of message per pushPeriod, an additional log is send when the limit is reached, logging how many logs were dropped&lt;/td&gt;
              &lt;td&gt;100&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;level&lt;/td&gt;
              &lt;td&gt;the minimal level of a message so it&amp;rsquo;s send to loki&lt;/td&gt;
              &lt;td&gt;all&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;pushPeriod&lt;/td&gt;
              &lt;td&gt;at what period to send log lines&lt;/td&gt;
              &lt;td&gt;1s&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;profile&lt;/td&gt;
              &lt;td&gt;whether to print some info about performance of the sending to loki&lt;/td&gt;
              &lt;td&gt;false&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;msgMaxSize&lt;/td&gt;
              &lt;td&gt;how many symbols can there be at most in a message. Messages bigger will miss the middle of the message with an additional few characters explaining how many characters were dropped.&lt;/td&gt;
              &lt;td&gt;1048576&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h3 id=&#34;file&#34;&gt;File&lt;/h3&gt;
&lt;p&gt;The file can be configured as below, where an explicit file path is required:&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;Bash&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-bash&#34;&gt;k6 run --log-output=file=./k6.log script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;A valid file path is the unique mandatory field, the other optional fields listed below:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;key&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;level&lt;/td&gt;
              &lt;td&gt;the minimal level of a message to write out of (in ascending order): trace, debug, info, warning, error, fatal, panic&lt;/td&gt;
              &lt;td&gt;trace&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;log-nanosecond-timestamps&#34;&gt;Log nanosecond timestamps&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether log timestamps use nanosecond precision instead of the default second precision. This is a global flag, available on every k6 subcommand.&lt;/p&gt;
&lt;p&gt;This only affects log output that includes an actual timestamp: &lt;a href=&#34;#logformat&#34;&gt;JSON log output&lt;/a&gt;, and the default text format when combined with &lt;a href=&#34;#no-color&#34;&gt;No color&lt;/a&gt;. It has no effect on colored terminal output, which shows elapsed time instead of a timestamp, and no effect on the &lt;code&gt;raw&lt;/code&gt; log format, which omits the timestamp entirely.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_LOG_NS_TIMESTAMPS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--log-ns-timestamps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --log-format=json --log-ns-timestamps script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;logformat&#34;&gt;LogFormat&lt;/h2&gt;
&lt;p&gt;A value specifying the log format. By default, k6 includes extra debug information like date and log level. The other options available are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;json&lt;/code&gt;: print all the debug information in JSON format.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;raw&lt;/code&gt;: print only the log message.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_LOG_FORMAT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--log-format&lt;/code&gt;, &lt;code&gt;-f&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --log-format raw test.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;max-redirects&#34;&gt;Max redirects&lt;/h2&gt;
&lt;p&gt;The maximum number of HTTP redirects that k6 will follow before giving up on a request and
erroring out. Available in both the &lt;code&gt;k6 run&lt;/code&gt; and the &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_MAX_REDIRECTS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--max-redirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;maxRedirects&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  maxRedirects: 10,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;minimum-iteration-duration&#34;&gt;Minimum iteration duration&lt;/h2&gt;
&lt;p&gt;Specifies the minimum duration of every single execution (i.e. iteration) of the &lt;code&gt;default&lt;/code&gt;
function. Any iterations that are shorter than this value will cause that VU to sleep for
the remainder of the time until the specified minimum duration is reached.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_MIN_ITERATION_DURATION&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--min-iteration-duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;minIterationDuration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt; (disabled)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  minIterationDuration: &amp;#39;10s&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-color&#34;&gt;No color&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether colored output is disabled. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-color&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --no-color script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Colored terminal output shows elapsed time instead of a timestamp. Disabling colors switches the default text log format to print an actual timestamp.&lt;/p&gt;
&lt;h2 id=&#34;no-connection-reuse&#34;&gt;No connection reuse&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, specifying whether k6 should disable keep-alive connections.
Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_CONNECTION_REUSE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-connection-reuse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;noConnectionReuse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  noConnectionReuse: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-cookies-reset&#34;&gt;No cookies reset&lt;/h2&gt;
&lt;p&gt;This disables the default behavior of resetting the cookie jar after each VU iteration. If
it&amp;rsquo;s enabled, saved cookies will be persisted across VU iterations.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_COOKIES_RESET&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;noCookiesReset&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  noCookiesReset: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-setup&#34;&gt;No setup&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether &lt;code&gt;setup()&lt;/code&gt; function should be run. Available in &lt;code&gt;k6 cloud run&lt;/code&gt; and &lt;code&gt;k6 run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_SETUP&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-setup&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --no-setup script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-teardown&#34;&gt;No teardown&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether &lt;code&gt;teardown()&lt;/code&gt; function should be run. Available in &lt;code&gt;k6 cloud run&lt;/code&gt; and &lt;code&gt;k6 run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_TEARDOWN&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-teardown&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --no-teardown script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-thresholds&#34;&gt;No thresholds&lt;/h2&gt;
&lt;p&gt;Disables threshold execution. Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_THRESHOLDS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-thresholds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --no-thresholds ~/script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;no-usage-report&#34;&gt;No usage report&lt;/h2&gt;
&lt;p&gt;A boolean, true or false. By default, k6 sends a usage report each time it is run, so that we can
track how often people use it. If this option is set to true, no usage report will be made. To
learn more, have a look at the 
    &lt;a href=&#34;/docs/k6/v2.3.x/set-up/usage-collection/&#34;&gt;Usage reports&lt;/a&gt; documentation. Available in
&lt;code&gt;k6 run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_USAGE_REPORT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-usage-report&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;noUsageReport&lt;/code&gt;*&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --no-usage-report ~/script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;* Note that this option is not supported in the exported script options, but can be specified in a configuration file.&lt;/p&gt;
&lt;h2 id=&#34;no-vu-connection-reuse&#34;&gt;No VU connection reuse&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, specifying whether k6 should reuse TCP connections between iterations
of a VU. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_NO_VU_CONNECTION_REUSE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--no-vu-connection-reuse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;noVUConnectionReuse&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  noVUConnectionReuse: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;once&#34;&gt;Once&lt;/h2&gt;
&lt;p&gt;Use &lt;code&gt;--once&lt;/code&gt; to run a script with one VU and one iteration for a smoke, end-to-end, or functional test. This is the supported single-run mode for scripts with no scenarios or one scenario, or for scenarios you explicitly select. You can reuse an existing load test, including a browser test, without editing its scenario configuration.&lt;/p&gt;
&lt;p&gt;Use &lt;code&gt;--once&lt;/code&gt; instead of &lt;code&gt;--vus 1 --iterations 1&lt;/code&gt; when you want to preserve the scenario&amp;rsquo;s function, environment variables, tags, and browser settings. Those shortcut flags can replace the scenario configuration and remove settings the script needs to run.&lt;/p&gt;
&lt;p&gt;Available in &lt;code&gt;k6 run&lt;/code&gt;, &lt;code&gt;k6 cloud run&lt;/code&gt;, and &lt;code&gt;k6 archive&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;sh&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-sh&#34;&gt;k6 run --once script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;If the script defines one scenario, k6 keeps its name, &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;env&lt;/code&gt;, &lt;code&gt;tags&lt;/code&gt;, and scenario &lt;code&gt;options&lt;/code&gt;, including browser settings. The scenario uses the &lt;code&gt;shared-iterations&lt;/code&gt; executor with one VU and one iteration. Its original executor settings and timing are replaced with the executor defaults: &lt;code&gt;startTime: &#39;0s&#39;&lt;/code&gt;, &lt;code&gt;maxDuration: &#39;10m&#39;&lt;/code&gt;, and &lt;code&gt;gracefulStop: &#39;30s&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;If the script defines no scenarios, k6 runs its &lt;code&gt;default&lt;/code&gt; function once. A scenario without &lt;code&gt;exec&lt;/code&gt; also runs &lt;code&gt;default&lt;/code&gt;, retaining its settings. The required function must exist. For scripts with more than one scenario, use 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/#run-selected-scenarios&#34;&gt;&lt;code&gt;--scenario&lt;/code&gt;&lt;/a&gt; to choose which ones to run; each selected scenario runs once with one VU. Bare &lt;code&gt;--once&lt;/code&gt; still returns an error for multiple scenarios. The &lt;code&gt;setup()&lt;/code&gt; and &lt;code&gt;teardown()&lt;/code&gt; functions run normally.&lt;/p&gt;
&lt;p&gt;You cannot combine &lt;code&gt;--once&lt;/code&gt; with &lt;code&gt;--vus&lt;/code&gt;, &lt;code&gt;--duration&lt;/code&gt;, &lt;code&gt;--iterations&lt;/code&gt;, &lt;code&gt;--stage&lt;/code&gt;, &lt;code&gt;--execution-segment&lt;/code&gt;, or &lt;code&gt;--execution-segment-sequence&lt;/code&gt;. When these load settings come from the script, a configuration file, or environment variables, k6 overrides them and logs a warning.&lt;/p&gt;
&lt;p&gt;For example, save this script as &lt;code&gt;script.js&lt;/code&gt;:&lt;/p&gt;
&lt;!-- md-k6:arg.--once=true --&gt;
&lt;!-- md-k6:fixedscenarios --&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 { check } from &amp;#39;k6&amp;#39;;
import http from &amp;#39;k6/http&amp;#39;;

export const options = {
  scenarios: {
    checkout: {
      executor: &amp;#39;constant-vus&amp;#39;,
      vus: 10,
      duration: &amp;#39;30s&amp;#39;,
      exec: &amp;#39;checkout&amp;#39;,
      env: { BASE_URL: &amp;#39;https://quickpizza.grafana.com&amp;#39; },
      tags: { team: &amp;#39;checkout&amp;#39; },
    },
  },
};

export function checkout() {
  const response = http.get(__ENV.BASE_URL);
  check(response, { &amp;#39;status is 200&amp;#39;: (r) =&amp;gt; r.status === 200 });
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Running &lt;code&gt;k6 run --once script.js&lt;/code&gt; calls &lt;code&gt;checkout&lt;/code&gt; once using the scenario&amp;rsquo;s base URL.&lt;/p&gt;
&lt;h2 id=&#34;paused&#34;&gt;Paused&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, specifying whether the test should start in a paused state. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_PAUSED&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--paused&lt;/code&gt;, &lt;code&gt;-p&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;paused&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  paused: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;profiling-enabled&#34;&gt;Profiling Enabled&lt;/h2&gt;
&lt;p&gt;Enables profiling endpoints under the [k6 REST API &lt;a href=&#34;#address&#34;&gt;address&lt;/a&gt; to help debug and profile k6 itself:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://pkg.go.dev/net/http/pprof&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;pprof&lt;/a&gt; profiling endpoints for CPU and memory profiling&lt;/li&gt;
&lt;li&gt;Prometheus &lt;a href=&#34;https://prometheus.io/docs/guides/go-application/#how-go-exposition-works&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;/metrics&lt;/a&gt; endpoint for exporting Go runtime metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The k6 REST API must be enabled for these endpoints to be available. Starting in k6 v2.0.0, the
REST API is off by default — pass &lt;a href=&#34;#address&#34;&gt;&lt;code&gt;--address&lt;/code&gt;&lt;/a&gt; (or set &lt;code&gt;K6_ADDRESS&lt;/code&gt;) when starting k6.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_PROFILING_ENABLED&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--profiling-enabled&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://localhost:6565/debug/pprof/&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --profiling-enabled script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;quiet&#34;&gt;Quiet&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, that disables the progress update bar on the console output. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--quiet&lt;/code&gt;, &lt;code&gt;-q&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run script.js -d 20s --quiet&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;results-output&#34;&gt;Results output&lt;/h2&gt;
&lt;p&gt;Specify the results output.
For information on all available outputs and how to configure them,
refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/&#34;&gt;Results output&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_OUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--out&lt;/code&gt;, &lt;code&gt;-o&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --out influxdb=http://localhost:8086/k6 script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;rps&#34;&gt;RPS&lt;/h2&gt;
&lt;p&gt;The maximum number of requests to make per second, in total across all VUs. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;&lt;strong&gt;This option is discouraged.&lt;/strong&gt;
&lt;br&gt;
&lt;br&gt;
The &lt;code&gt;--rps&lt;/code&gt; option has caveats and is difficult to use correctly.
&lt;br&gt;
&lt;br&gt;
For example, in the cloud or distributed execution, this option affects every k6 instance independently.
That is, it is not sharded like VUs are.
&lt;br&gt;
&lt;br&gt;
We strongly recommend the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/concepts/open-vs-closed/&#34;&gt;arrival-rate executors&lt;/a&gt; to simulate constant RPS instead of this option.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_RPS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--rps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;rps&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;0&lt;/code&gt; (unlimited)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  rps: 500,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;h3 id=&#34;considerations-when-running-in-the-cloud&#34;&gt;Considerations when running in the cloud&lt;/h3&gt;
&lt;p&gt;The option is set per load generator which means that the value you set in the options object of your test script will be multiplied by the number of load generators your test run is using. At the moment we are hosting 300 VUs per load generator instance. In practice that means that if you set the option for 100 rps, and run a test with 1000 VUs, you will spin up 4 load gen instances and effective rps limit of your test run will be 400&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;scenario-selection&#34;&gt;Scenario selection&lt;/h2&gt;
&lt;p&gt;Select one or more configured scenarios by name with &lt;code&gt;--scenario&lt;/code&gt;, using commas to separate multiple names. Available in &lt;code&gt;k6 run&lt;/code&gt;, &lt;code&gt;k6 cloud run&lt;/code&gt;, and &lt;code&gt;k6 archive&lt;/code&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--scenario&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;All configured scenarios&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Selection keeps each selected scenario&amp;rsquo;s settings and skips thresholds tied to excluded scenarios. Refer to 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/#run-selected-scenarios&#34;&gt;Run selected scenarios&lt;/a&gt; for examples, load-option restrictions, threshold behavior, and combining selection with &lt;code&gt;--once&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;scenarios&#34;&gt;Scenarios&lt;/h2&gt;
&lt;p&gt;Define one or more execution patterns, with various VU and iteration scheduling
settings, running different exported functions (besides &lt;code&gt;default&lt;/code&gt;!), using different
environment variables, tags, and more.&lt;/p&gt;
&lt;p&gt;See the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;Scenarios&lt;/a&gt; article for details and more examples.&lt;/p&gt;
&lt;p&gt;Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;scenarios&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  scenarios: {
    my_api_scenario: {
      // arbitrary scenario name
      executor: &amp;#39;ramping-vus&amp;#39;,
      startVUs: 0,
      stages: [
        { duration: &amp;#39;5s&amp;#39;, target: 100 },
        { duration: &amp;#39;5s&amp;#39;, target: 0 },
      ],
      gracefulRampDown: &amp;#39;10s&amp;#39;,
      env: { MYVAR: &amp;#39;example&amp;#39; },
      tags: { my_tag: &amp;#39;example&amp;#39; },
    },
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;secret-source&#34;&gt;Secret source&lt;/h2&gt;
&lt;p&gt;Specify 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/secret-sources/&#34;&gt;source of secrets&lt;/a&gt; to be used within k6 script.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--secret-source&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;Multiple secret sources can be provided and if &lt;code&gt;name=&amp;lt;value&amp;gt;&lt;/code&gt; is provided the secret source will have the given name.&lt;/p&gt;
&lt;p&gt;Additional &lt;code&gt;default&lt;/code&gt; can be added to set a single default secret source. If only one is provided it will be the default by default, when multiple are provided it is required to be configured.&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;Bash&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-bash&#34;&gt;$ k6 cloud run --secret-source=mock=name=something,key=value,key2=value2 --secret-source=mock,default,key=value3 script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The above will define two mock secret source, one of them has a name &amp;ldquo;something&amp;rdquo;, while the other one is the default.&lt;/p&gt;
&lt;h2 id=&#34;setup-timeout&#34;&gt;Setup timeout&lt;/h2&gt;
&lt;p&gt;Specify how long the &lt;code&gt;setup()&lt;/code&gt; function can run before it&amp;rsquo;s terminated and the test fails. If defined, the value must be positive.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SETUP_TIMEOUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;setupTimeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  setupTimeout: &amp;#39;30s&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;In Grafana Cloud k6, the maximum allowed value for &lt;code&gt;setupTimeout&lt;/code&gt; is &lt;em&gt;10 minutes&lt;/em&gt; (&lt;code&gt;&amp;quot;600s&amp;quot;&lt;/code&gt; or &lt;code&gt;&amp;quot;10m&amp;quot;&lt;/code&gt;). If &lt;code&gt;setup()&lt;/code&gt; doesn&amp;rsquo;t complete within this time, the test fails before any VUs start.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;show-logs&#34;&gt;Show logs&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether the cloud logs are printed out to the terminal. Available in &lt;code&gt;k6 cloud run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--show-logs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 cloud run --show-logs=false script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;stages&#34;&gt;Stages&lt;/h2&gt;
&lt;p&gt;A list of VU &lt;code&gt;{ target: ..., duration: ... }&lt;/code&gt; objects that specify the target number of VUs to
ramp up or down to for a specific period. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud run&lt;/code&gt; commands.&lt;/p&gt;
&lt;p&gt;It is a shortcut option for a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenario&lt;/a&gt; with a 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/ramping-vus/&#34;&gt;ramping VUs executor&lt;/a&gt;. If used together with the &lt;a href=&#34;#vus&#34;&gt;VUs&lt;/a&gt; option, the &lt;code&gt;vus&lt;/code&gt; value is used as the &lt;code&gt;startVUs&lt;/code&gt; option of the executor.&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;For a single-run smoke or functional test, use &lt;a href=&#34;#once&#34;&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/a&gt;. It runs one iteration with one VU while preserving a single scenario&amp;rsquo;s behavior and browser settings. &lt;code&gt;--stage&lt;/code&gt; defines a load ramp and can replace the script&amp;rsquo;s scenario configuration.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_STAGES&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--stage &amp;lt;duration&amp;gt;:&amp;lt;target&amp;gt;&lt;/code&gt;, &lt;code&gt;-s &amp;lt;duration&amp;gt;:&amp;lt;target&amp;gt;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;stages&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Based on &lt;code&gt;vus&lt;/code&gt; and &lt;code&gt;duration&lt;/code&gt;.&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;


  

  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;JavaScript&#34;&gt;JavaScript&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;Bash&#34;&gt;Bash&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;windows&#34;&gt;windows&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;3&#34; data-label=&#34;powershell&#34;&gt;powershell&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#34;&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;// The following config would have k6 ramping up from 1 to 10 VUs for 3 minutes,
// then staying flat at 10 VUs for 5 minutes, then ramping up from 10 to 35 VUs
// over the next 10 minutes before finally ramping down to 0 VUs for another
// 3 minutes.

export const options = {
  stages: [
    { duration: &amp;#39;3m&amp;#39;, target: 10 },
    { duration: &amp;#39;5m&amp;#39;, target: 10 },
    { duration: &amp;#39;10m&amp;#39;, target: 35 },
    { duration: &amp;#39;3m&amp;#39;, target: 0 },
  ],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;Bash&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-bash&#34;&gt;k6 run --stage 5s:10,5m:20,10s:5 script.js

# or...

K6_STAGES=&amp;#34;5s:10,5m:20,10s:5&amp;#34; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;windows&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-windows&#34;&gt;k6 run --stage 5s:10,5m:20,10s:5 script.js

# or...

set &amp;#34;K6_STAGES=5s:10,5m:20,10s:5&amp;#34; &amp;amp;&amp;amp; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;powershell&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-powershell&#34;&gt;k6 run --stage 5s:10,5m:20,10s:5 script.js

# or...

$env:K6_STAGES=&amp;#34;5s:10,5m:20,10s:5&amp;#34;; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;summary-export&#34;&gt;Summary export&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;k6 v1.5.0 introduced a new opt-in format available for summary exports, designed for easier integration with external systems and analytics pipelines. You can learn more details about it in the

    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/#summary-data-reference&#34;&gt;&lt;code&gt;handleSummary()&lt;/code&gt; function&lt;/a&gt; page.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;p&gt;Save the end-of-test summary report to a JSON file that includes data for all test metrics, checks and thresholds.
This is useful to get the aggregated test results in a machine-readable format, for integration with dashboards, external alerts, CI pipelines, etc.&lt;/p&gt;
&lt;p&gt;While this feature is not deprecated yet, 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/#summary-export-to-a-json-file&#34;&gt;we now discourage it&lt;/a&gt;.
For a better, more flexible JSON export, as well as export of the summary data to different formats (e.g. JUnit/XUnit/etc. XML, HTML, .txt) and complete summary customization, use the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;&lt;code&gt;handleSummary()&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SUMMARY_EXPORT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--summary-export &amp;lt;filename&amp;gt;&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;


  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;Bash&#34;&gt;Bash&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;windows&#34;&gt;windows&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;powershell&#34;&gt;powershell&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#34;&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;Bash&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-bash&#34;&gt;k6 run --summary-export export.json script.js

# or...

K6_SUMMARY_EXPORT=&amp;#34;export.json&amp;#34; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;windows&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-windows&#34;&gt;k6 run --summary-export export.json script.js

# or...

set &amp;#34;K6_SUMMARY_EXPORT=export.json&amp;#34; &amp;amp;&amp;amp; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;powershell&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-powershell&#34;&gt;k6 run --summary-export export.json script.js

# or...

$env:K6_SUMMARY_EXPORT=&amp;#34;export.json&amp;#34;; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;See an example file on the 
    &lt;a href=&#34;/docs/k6/v2.3.x/get-started/results-output/#summary-export&#34;&gt;Results Output&lt;/a&gt; page.&lt;/p&gt;
&lt;h2 id=&#34;summary-mode&#34;&gt;Summary mode&lt;/h2&gt;
&lt;p&gt;Define how detailed the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt; should be. Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SUMMARY_MODE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--summary-mode&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;compact&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;The following modes are available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;compact&lt;/strong&gt; (default): Shows the most relevant test results in a concise format, focusing on:
&lt;ul&gt;
&lt;li&gt;Thresholds results&lt;/li&gt;
&lt;li&gt;Checks results&lt;/li&gt;
&lt;li&gt;Aggregated metrics by category&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;full&lt;/strong&gt;: Shows all available information, including:
&lt;ul&gt;
&lt;li&gt;Everything from compact mode&lt;/li&gt;
&lt;li&gt;Detailed metrics for each protocol-specific category&lt;/li&gt;
&lt;li&gt;Group-specific results&lt;/li&gt;
&lt;li&gt;Scenario-specific results&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;disabled&lt;/strong&gt;: Completely disables the summary generation, including:
&lt;ul&gt;
&lt;li&gt;Calls to 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;&lt;code&gt;handleSummary()&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;The use of &lt;code&gt;--summary-export&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;



  

  

  


&lt;div data-element=&#34;tabs&#34;&gt;
  &lt;div data-element=&#34;tabs-bar&#34;&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;0&#34; data-label=&#34;Bash&#34;&gt;Bash&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;1&#34; data-label=&#34;windows&#34;&gt;windows&lt;/div&gt;
    
      &lt;div data-element=&#34;tab&#34; data-key=&#34;2&#34; data-label=&#34;powershell&#34;&gt;powershell&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div data-element=&#34;tab-content&#34;&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;Bash&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-bash&#34;&gt;k6 run --summary-mode=full script.js

# or...

K6_SUMMARY_MODE=&amp;#34;full&amp;#34; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;windows&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-windows&#34;&gt;k6 run --summary-mode=full script.js

# or...

set &amp;#34;K6_SUMMARY_MODE=full&amp;#34; &amp;amp;&amp;amp; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;powershell&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-powershell&#34;&gt;k6 run --summary-mode=full script.js

# or...

$env:K6_SUMMARY_MODE=&amp;#34;full&amp;#34;; k6 run script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;

  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;summary-trend-stats&#34;&gt;Summary trend stats&lt;/h2&gt;
&lt;p&gt;Define which stats for 
    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-metrics/trend/&#34;&gt;&lt;code&gt;Trend&lt;/code&gt; metrics&lt;/a&gt; (e.g. response times, group/iteration durations, etc.) will be shown in the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt;. Possible values include &lt;code&gt;avg&lt;/code&gt; (average), &lt;code&gt;med&lt;/code&gt; (median), &lt;code&gt;min&lt;/code&gt;, &lt;code&gt;max&lt;/code&gt;, &lt;code&gt;count&lt;/code&gt;, as well as arbitrary percentile values (e.g. &lt;code&gt;p(95)&lt;/code&gt;, &lt;code&gt;p(99)&lt;/code&gt;, &lt;code&gt;p(99.99)&lt;/code&gt;, etc.).&lt;/p&gt;
&lt;p&gt;For further summary customization and exporting the summary in various formats (e.g. JSON, JUnit/XUnit/etc. XML, HTML, .txt, etc.), use the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/custom-summary/&#34;&gt;&lt;code&gt;handleSummary()&lt;/code&gt; function&lt;/a&gt;.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SUMMARY_TREND_STATS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--summary-trend-stats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;summaryTrendStats&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;avg,min,med,max,p(90),p(95)&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  summaryTrendStats: [&amp;#39;avg&amp;#39;, &amp;#39;min&amp;#39;, &amp;#39;med&amp;#39;, &amp;#39;max&amp;#39;, &amp;#39;p(90)&amp;#39;, &amp;#39;p(95)&amp;#39;, &amp;#39;p(99.99)&amp;#39;, &amp;#39;count&amp;#39;],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;Bash&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-bash&#34;&gt;k6 run --summary-trend-stats=&amp;#34;avg,min,med,max,p(90),p(99.9),p(99.99),count&amp;#34; ./script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;summary-time-unit&#34;&gt;Summary time unit&lt;/h2&gt;
&lt;p&gt;Define which time unit will be used for &lt;em&gt;all&lt;/em&gt; time values in the 
    &lt;a href=&#34;/docs/k6/v2.3.x/results-output/end-of-test/&#34;&gt;end-of-test summary&lt;/a&gt;. Possible values are &lt;code&gt;s&lt;/code&gt; (seconds), &lt;code&gt;ms&lt;/code&gt; (milliseconds) and &lt;code&gt;us&lt;/code&gt; (microseconds). If no value is specified, k6 will use mixed time units, choosing the most appropriate unit for each value.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SUMMARY_TIME_UNIT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--summary-time-unit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;summaryTimeUnit&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  summaryTimeUnit: &amp;#39;ms&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;supply-environment-variables&#34;&gt;Supply environment variables&lt;/h2&gt;
&lt;p&gt;Add/override an 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/environment-variables/&#34;&gt;environment variable&lt;/a&gt; with &lt;code&gt;VAR=value&lt;/code&gt;in a k6 script. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands.&lt;/p&gt;
&lt;p&gt;To make the system environment variables available in the k6 script via &lt;code&gt;__ENV&lt;/code&gt;, use the &lt;a href=&#34;#include-system-env-vars&#34;&gt;&lt;code&gt;--include-system-env-vars&lt;/code&gt; option&lt;/a&gt;.&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;&lt;strong&gt;The &lt;code&gt;-e&lt;/code&gt; flag does not configure options.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This flag just provides variables to the script, which the script can use or ignore.
For example, &lt;code&gt;-e K6_ITERATIONS=120&lt;/code&gt; does &lt;em&gt;not&lt;/em&gt; configure the script iterations.&lt;/p&gt;
&lt;p&gt;Compare this behavior with &lt;code&gt;K6_ITERATIONS=120 k6 run script.js&lt;/code&gt;, which &lt;em&gt;does&lt;/em&gt; set iterations.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--env&lt;/code&gt;, &lt;code&gt;-e&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run -e FOO=bar ~/script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;system-tags&#34;&gt;System tags&lt;/h2&gt;
&lt;p&gt;Specify which 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/tags-and-groups/#system-tags&#34;&gt;system tags&lt;/a&gt; will be in the collected
metrics. Some collectors like the &lt;code&gt;cloud&lt;/code&gt; one may require that certain system tags be used.
You can specify the tags as an array from the JS scripts or as a comma-separated list via the
CLI. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_SYSTEM_TAGS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--system-tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;systemTags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;proto&lt;/code&gt;,&lt;code&gt;subproto&lt;/code&gt;,&lt;code&gt;status&lt;/code&gt;,&lt;code&gt;method&lt;/code&gt;,&lt;code&gt;url&lt;/code&gt;,&lt;code&gt;name&lt;/code&gt;,&lt;code&gt;group&lt;/code&gt;,&lt;code&gt;check&lt;/code&gt;,&lt;code&gt;error&lt;/code&gt;,&lt;code&gt;error_code&lt;/code&gt;,&lt;code&gt;tls_version&lt;/code&gt;,&lt;code&gt;scenario&lt;/code&gt;,&lt;code&gt;service&lt;/code&gt;,&lt;code&gt;expected_response&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  systemTags: [&amp;#39;status&amp;#39;, &amp;#39;method&amp;#39;, &amp;#39;url&amp;#39;],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;tags&#34;&gt;Tags&lt;/h2&gt;
&lt;p&gt;Specify tags that should be set test wide across all metrics. If a tag with the same name has
been specified on a request, check or custom metrics it will have precedence over a test wide
tag. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--tag NAME=VALUE&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tags&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  tags: {
    name: &amp;#39;value&amp;#39;,
    another: &amp;#39;different value&amp;#39;,
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Multiple CLI flags can be provided to set more than one tag at a time:&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;shell&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-shell&#34;&gt;k6 run --tag name=value --tag another=&amp;#34;different value&amp;#34; script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;teardown-timeout&#34;&gt;Teardown timeout&lt;/h2&gt;
&lt;p&gt;Specify how long the &lt;code&gt;teardown()&lt;/code&gt; function is allowed to run before it&amp;rsquo;s terminated and the test
fails.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_TEARDOWN_TIMEOUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;teardownTimeout&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;&amp;quot;60s&amp;quot;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  teardownTimeout: &amp;#39;30s&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;thresholds&#34;&gt;Thresholds&lt;/h2&gt;
&lt;p&gt;A collection of threshold specifications to configure under what condition(s) a test is considered
successful or not, when it has passed or failed, based on metric data. To learn more, have a look
at the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/thresholds/&#34;&gt;Thresholds&lt;/a&gt; documentation. Available in &lt;code&gt;k6 run&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;thresholds&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  thresholds: {
    &amp;#39;http_req_duration&amp;#39;: [&amp;#39;avg&amp;lt;100&amp;#39;, &amp;#39;p(95)&amp;lt;200&amp;#39;],
    &amp;#39;http_req_connecting{cdnAsset:true}&amp;#39;: [&amp;#39;p(95)&amp;lt;100&amp;#39;],
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;throw&#34;&gt;Throw&lt;/h2&gt;
&lt;p&gt;A boolean, true or false, specifying whether k6 should throw exceptions when certain errors occur, or if it should just log them with a warning. Behaviors that currently depend on this option:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Failing to make 
    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-http/&#34;&gt;HTTP requests&lt;/a&gt;, e.g. due to a network error.&lt;/li&gt;
&lt;li&gt;Adding invalid values to 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/metrics/#custom-metrics&#34;&gt;custom metrics&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Setting invalid 
    &lt;a href=&#34;/docs/k6/v2.3.x/javascript-api/k6-execution/#tags&#34;&gt;per-VU metric tags&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_THROW&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--throw&lt;/code&gt;, &lt;code&gt;-w&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;throw&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  throw: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;tls-aia-fetch&#34;&gt;TLS AIA fetch&lt;/h2&gt;
&lt;p&gt;A boolean, true or false. When enabled, k6 follows the Authority Information Access (AIA) extension on server-presented certificates to fetch missing intermediate CA certificates over HTTP. This lets k6 verify TLS chains against servers that don&amp;rsquo;t bundle the full chain in their handshake, which browsers do by default but Go&amp;rsquo;s &lt;code&gt;crypto/tls&lt;/code&gt; does not.&lt;/p&gt;
&lt;p&gt;Fetched intermediates are cached and reused for the lifetime of the test, and AIA fetches respect the same blocking, host override, and DNS rules as regular test traffic. This option has no effect when &lt;code&gt;insecureSkipTLSVerify&lt;/code&gt; is enabled.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_TLS_AIA_FETCH&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tlsAIAFetch&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  tlsAIAFetch: true,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;tls-auth&#34;&gt;TLS auth&lt;/h2&gt;
&lt;p&gt;A list of TLS client certificate configuration objects. &lt;code&gt;domains&lt;/code&gt; and &lt;code&gt;password&lt;/code&gt; are optional, but &lt;code&gt;cert&lt;/code&gt; and &lt;code&gt;key&lt;/code&gt; are required.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tlsAuth&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  tlsAuth: [
    {
      domains: [&amp;#39;example.com&amp;#39;],
      cert: open(&amp;#39;mycert.pem&amp;#39;),
      key: open(&amp;#39;mycert-key.pem&amp;#39;),
      password: &amp;#39;mycert-passphrase&amp;#39;,
    },
  ],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;tls-cipher-suites&#34;&gt;TLS cipher suites&lt;/h2&gt;
&lt;p&gt;A list of cipher suites allowed to be used by in SSL/TLS interactions with a server.
For a full listing of available ciphers go &lt;a href=&#34;https://golang.org/pkg/crypto/tls/#pkg-constants&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;


&lt;div class=&#34;admonition admonition-caution&#34;&gt;&lt;blockquote&gt;&lt;p class=&#34;title text-uppercase&#34;&gt;Caution&lt;/p&gt;&lt;p&gt;Due to limitations in the underlying &lt;a href=&#34;https://github.com/golang/go/issues/29349&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;go implementation&lt;/a&gt;, changing the ciphers for TLS 1.3 is &lt;em&gt;not&lt;/em&gt; supported and will do nothing.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tlsCipherSuites&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt; (Allow all suites)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  tlsCipherSuites: [&amp;#39;TLS_RSA_WITH_RC4_128_SHA&amp;#39;, &amp;#39;TLS_RSA_WITH_AES_128_GCM_SHA256&amp;#39;],
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;tls-version&#34;&gt;TLS version&lt;/h2&gt;
&lt;p&gt;Either a string representing the only SSL/TLS version allowed to be used in interactions with a
server, or an object specifying the &amp;ldquo;min&amp;rdquo; and &amp;ldquo;max&amp;rdquo; versions allowed to be used.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;tlsVersion&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;null&lt;/code&gt; (Allow all versions)&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  tlsVersion: &amp;#39;tls1.2&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&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;export const options = {
  tlsVersion: {
    min: &amp;#39;ssl3.0&amp;#39;,
    max: &amp;#39;tls1.2&amp;#39;,
  },
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;traces-output&#34;&gt;Traces output&lt;/h2&gt;
&lt;p&gt;This option specifies where to send traces to. Available in the &lt;code&gt;k6 run&lt;/code&gt; command.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_TRACES_OUTPUT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--traces-output&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;none&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --traces-output=otel script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Possible values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;none - disable&lt;/li&gt;
&lt;li&gt;otel - send traces to an OTEL compatible backend&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;otel&#34;&gt;OTEL&lt;/h3&gt;
&lt;p&gt;Use the &lt;code&gt;traces-output&lt;/code&gt; option to configure &lt;a href=&#34;https://opentelemetry.io/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Open Telemetry&lt;/a&gt; compatible output as follows.&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;Bash&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-bash&#34;&gt;k6 run --traces-output=otel=http://127.0.0.1:4318,proto=http,header.AdditionalHeader=example script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Where none of the options are required.
The possible keys with their meanings and default values:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;key&lt;/th&gt;
              &lt;th&gt;description&lt;/th&gt;
              &lt;th&gt;default value&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;nothing&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;the endpoint to which send traces to&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;http://127.0.0.1:4317&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;proto&lt;/td&gt;
              &lt;td&gt;the protocol to use when connecting with the traces backend&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;grpc&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;header.&lt;code&gt;headerName&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;adds an additional HTTP header with the provided header name and value to each HTTP request made to the traces backend&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;user-agent&#34;&gt;User agent&lt;/h2&gt;
&lt;p&gt;A string specifying the user-agent string to use in &lt;code&gt;User-Agent&lt;/code&gt; headers when sending HTTP
requests.
If you pass an empty string, no &lt;code&gt;User-Agent&lt;/code&gt; header is sent.
Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_USER_AGENT&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--user-agent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;userAgent&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;Grafana k6/&amp;lt;K6_VERSION&amp;gt;&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  userAgent: &amp;#39;MyK6UserAgentString/1.0&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;verbose&#34;&gt;Verbose&lt;/h2&gt;
&lt;p&gt;A boolean specifying whether verbose logging is enabled. Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--verbose&lt;/code&gt;, &lt;code&gt;-v&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;N/A&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;Bash&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-bash&#34;&gt;k6 run --verbose script.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;vus&#34;&gt;VUs&lt;/h2&gt;
&lt;p&gt;An integer value specifying the number of VUs to run concurrently, used together with the &lt;a href=&#34;#iterations&#34;&gt;iterations&lt;/a&gt; or &lt;a href=&#34;#duration&#34;&gt;duration&lt;/a&gt; options. If you&amp;rsquo;d like more control look at the &lt;a href=&#34;#stages&#34;&gt;&lt;code&gt;stages&lt;/code&gt;&lt;/a&gt; option or 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/&#34;&gt;scenarios&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Available in &lt;code&gt;k6 run&lt;/code&gt; and &lt;code&gt;k6 cloud&lt;/code&gt; commands.&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;To run an existing script with one VU and one iteration, use &lt;a href=&#34;#once&#34;&gt;&lt;code&gt;--once&lt;/code&gt;&lt;/a&gt;. It preserves a single scenario&amp;rsquo;s function and settings, including browser options. Setting &lt;code&gt;--vus 1&lt;/code&gt; alone does not preserve a script-defined scenario.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Env&lt;/th&gt;
              &lt;th&gt;CLI&lt;/th&gt;
              &lt;th&gt;Code / Config file&lt;/th&gt;
              &lt;th&gt;Default&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;K6_VUS&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;--vus&lt;/code&gt;, &lt;code&gt;-u&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;vus&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&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;export const options = {
  vus: 10,
  duration: &amp;#39;1h&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;When you pass &lt;code&gt;--vus N&lt;/code&gt; on its own (without &lt;code&gt;--duration&lt;/code&gt;, &lt;code&gt;--iterations&lt;/code&gt;, or &lt;code&gt;--stage&lt;/code&gt;), k6 creates a single 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/scenarios/executors/shared-iterations/&#34;&gt;shared-iterations&lt;/a&gt; scenario with &lt;code&gt;N&lt;/code&gt; VUs and &lt;code&gt;N&lt;/code&gt; iterations. This overrides any scenarios defined in the script and prints a warning, consistent with how &lt;code&gt;--duration&lt;/code&gt;, &lt;code&gt;--iterations&lt;/code&gt;, and &lt;code&gt;--stage&lt;/code&gt; behave.&lt;/p&gt;
]]></content><description>&lt;h1 id="options-reference">Options reference&lt;/h1>
&lt;!-- md-k6:skipall -->
&lt;p>Options define test-run behavior.
Most options can be passed in multiple places.
If an option is defined in multiple places, k6 chooses the value from the highest
&lt;a href="/docs/k6/v2.3.x/using-k6/k6-options/how-to/#order-of-precedence">order of precedence&lt;/a>.&lt;/p></description></item></channel></rss>