<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Create tests from recordings on Grafana Labs</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/</link><description>Recent content in Create tests from recordings on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/index.xml" rel="self" type="application/rss+xml"/><item><title>Using the browser recorder</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/using-the-browser-recorder/</guid><content><![CDATA[&lt;h1 id=&#34;using-the-browser-recorder&#34;&gt;Using the browser recorder&lt;/h1&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;The Grafana k6 Browser Recorder extension is deprecated. Use &lt;a href=&#34;/docs/k6-studio/&#34;&gt;k6 Studio&lt;/a&gt; to record network traffic.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;before-you-start&#34;&gt;Before you start&lt;/h2&gt;
&lt;p&gt;Before you start, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/#be-sure-to-record-realistically&#34;&gt;Be sure to record realistically&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/#consider-hybrid-approach-for-load-testing-websites&#34;&gt;A hybrid approach for load testing websites&lt;/a&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;Note that the browser recorders &lt;strong&gt;don&amp;rsquo;t require a cloud account&lt;/strong&gt;. For cloud users, refer to the &lt;a href=&#34;/docs/grafana-cloud/testing/k6/author-run/browser-recorder/&#34;&gt;Grafana Cloud&lt;/a&gt; instructions.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;how-to-record&#34;&gt;How to record&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Install the &lt;a href=&#34;https://chrome.google.com/webstore/detail/grafana-k6-browser-record/fbanjfonbcedhifbgikmjelkkckhhidl&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Chrome&lt;/a&gt; or &lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/grafana-k6-browser-recorder/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Firefox&lt;/a&gt; extension.&lt;/li&gt;
&lt;li&gt;Open the extension by clicking the k6 logo.&lt;/li&gt;
&lt;li&gt;Choose where to save the auto-generated script.
&lt;ul&gt;
&lt;li&gt;To save it on your local machine, select &lt;strong&gt;I don&amp;rsquo;t want to save tests in the cloud&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;To save it on any of your Grafana Cloud k6 projects, select &lt;strong&gt;Sign In&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Start recording&lt;/strong&gt; to begin recording the current browser tab.&lt;/li&gt;
&lt;li&gt;When done, select &lt;strong&gt;Stop recording&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Save the recorded script locally or in any of your cloud projects.&lt;/li&gt;
&lt;li&gt;Edit your script as necessary. Depending on the 
    &lt;a href=&#34;/docs/k6/v2.3.x/testing-guides/test-types/&#34;&gt;type of load test&lt;/a&gt;, you might need to change different aspects of the script.
Typical changes are for 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/&#34;&gt;load options&lt;/a&gt; and to handle 
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/correlation-and-dynamic-data/&#34;&gt;correlation and dynamic data&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Run the test from the CLI or Grafana Cloud k6. For more about running k6, refer to the 
    &lt;a href=&#34;/docs/k6/v2.3.x/get-started/running-k6/&#34;&gt;Running k6 guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;troubleshooting-try-the-har-converter&#34;&gt;Troubleshooting. Try the HAR converter&lt;/h2&gt;
&lt;p&gt;If you experience problems recording a request, try the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter/&#34;&gt;HAR converter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The Browser recorder uses the HAR converter under the hood.
Like the Browser Recorder, the HAR converter creates a k6 script from the HTTP requests included in a HAR file.&lt;/p&gt;
&lt;p&gt;The HAR converter can also record other tabs or pop-up windows, which the Browser Recorder cannot.&lt;/p&gt;
&lt;p&gt;If the error persists with the HAR converter, please provide detailed information about the problem &lt;a href=&#34;https://github.com/k6io/har-to-k6/issues&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;in a new issue&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="using-the-browser-recorder">Using the browser recorder&lt;/h1>
&lt;div class="admonition admonition-caution">&lt;blockquote>&lt;p class="title text-uppercase">Caution&lt;/p>&lt;p>The Grafana k6 Browser Recorder extension is deprecated. Use &lt;a href="/docs/k6-studio/">k6 Studio&lt;/a> to record network traffic.&lt;/p>&lt;/blockquote>&lt;/div>
&lt;h2 id="before-you-start">Before you start&lt;/h2>
&lt;p>Before you start, consider the following:&lt;/p></description></item><item><title>Using the HAR converter</title><link>https://grafana.com/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter/</link><pubDate>Mon, 21 Sep 2026 15:16:28 +0000</pubDate><guid>https://grafana.com/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/using-the-har-converter/</guid><content><![CDATA[&lt;h1 id=&#34;using-the-har-converter&#34;&gt;Using the HAR converter&lt;/h1&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/k6io/har-to-k6&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;har-to-k6 converter&lt;/a&gt; is a NodeJS tool that generates a k6 script based on the HTTP requests included in a &lt;a href=&#34;https://en.wikipedia.org/wiki/HAR_%28file_format%29&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HAR file&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;HAR is a file format used by all major browsers and various other tools to export recorded HTTP requests.&lt;/p&gt;&lt;/blockquote&gt;&lt;/div&gt;

&lt;h2 id=&#34;before-you-start&#34;&gt;Before you start&lt;/h2&gt;
&lt;p&gt;Before you start, consider the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/#be-sure-to-record-realistically&#34;&gt;Be sure to record realistically&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/test-authoring/create-tests-from-recordings/#consider-hybrid-approach-for-load-testing-websites&#34;&gt;A hybrid approach for load testing websites&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You&amp;rsquo;ll need to choose a tool to record your HAR file.
Multiple browsers and tools can export HTTP traffic in a HAR format.
A few popular ones are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://www.google.com/chrome/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Chrome&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.mozilla.org/en-US/firefox/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Firefox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.microsoft.com/en-us/edge&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft Edge&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.charlesproxy.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Charles recording proxy&lt;/a&gt;(HTTP proxy/recorder)&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.telerik.com/fiddler&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Fiddler&lt;/a&gt; (HTTP proxy/recorder)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;1-record-a-har-file&#34;&gt;1. Record a HAR file&lt;/h2&gt;
&lt;p&gt;Here are the basic steps you need to record in Chrome:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open a new incognito window in Chrome. (This is optional, but it means you won&amp;rsquo;t send things like cookies, which your browser might have saved).&lt;/li&gt;
&lt;li&gt;Open up Chrome developer tools (press F12).&lt;/li&gt;
&lt;li&gt;Select the &lt;strong&gt;Network&lt;/strong&gt; tab.&lt;/li&gt;
&lt;li&gt;Check that the recording button (round button) is activated (red color).&lt;/li&gt;
&lt;li&gt;If you want to make a recording of several successive page loads, select the &lt;strong&gt;Preserve log&lt;/strong&gt; checkbox.&lt;/li&gt;
&lt;li&gt;Enter the URL of your site and start doing whatever you want your simulated load-test users to do.&lt;/li&gt;
&lt;li&gt;When done, in Chrome developer tools, right-click the URLs and choose &lt;strong&gt;Save as HAR with content&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/session_recorder_save_as_har.png&#34;
  alt=&#34;Save HAR for load testing&#34; width=&#34;600&#34;
     height=&#34;470&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;2-convert-with-har-to-k6&#34;&gt;2. Convert with &lt;code&gt;har-to-k6&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&#34;https://github.com/k6io/har-to-k6&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;har-to-k6 converter&lt;/a&gt; is a NodeJS tool that can convert a HAR file (browser session) into a k6 script.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Make sure that you have installed NodeJS (version &amp;gt;=11.0.0).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the converter. You can use &lt;code&gt;npm&lt;/code&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;npm install -g har-to-k6&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For other installation options, check out the &lt;a href=&#34;https://github.com/k6io/har-to-k6#installation&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;har-to-k6 installation instructions&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Generate a k6 script from a HAR file with the convert command:&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;har-to-k6 myfile.har -o loadtest.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;This command auto-generates a k6 script for you.
It reads the HAR file (&lt;em&gt;myfile.har&lt;/em&gt;) and converts it into a k6 test (&lt;em&gt;loadtest.js&lt;/em&gt;).&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;3-modify-the-auto-generated-k6-script&#34;&gt;3. Modify the auto-generated k6 script&lt;/h2&gt;
&lt;p&gt;In the previous step, the converter created a k6 script for testing.
Now, you should evaluate whether you have to change any part of the k6 script.&lt;/p&gt;
&lt;p&gt;Depending on your use case, you might need to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configure the load options&lt;/li&gt;
&lt;li&gt;Remove third-party content&lt;/li&gt;
&lt;li&gt;Correlate dynamic data&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;configure-the-load-options&#34;&gt;Configure the load options&lt;/h3&gt;
&lt;p&gt;Now, k6 has auto-generated a &amp;ldquo;functional&amp;rdquo; test.
By default, this test runs with one virtual user and for one iteration.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s time for you to configure the load options of your performance tests.
k6 lets you configure this in several ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;As CLI arguments while running the test:&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 --vus 10 --duration 30s loadtest.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As options in the 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;export const options = {
  vus: 10,
  duration: &amp;#39;30s&amp;#39;,
};&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To learn more about how to configure the load options, read the 
    &lt;a href=&#34;/docs/k6/v2.3.x/get-started/running-k6/#adding-more-vus&#34;&gt;Adding more VUs guide&lt;/a&gt; and the 
    &lt;a href=&#34;/docs/k6/v2.3.x/using-k6/k6-options/&#34;&gt;Options guide&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;remove-third-party-content&#34;&gt;Remove third-party content&lt;/h3&gt;
&lt;p&gt;If you are recording a user session of a website, by default, you&amp;rsquo;ll record all the HTTP requests that your website uses.
This includes requests from the third-party tools that your site uses,
e.g. analytics tools, Facebook, Twitter, Support Widgets, CDNs, etc.&lt;/p&gt;
&lt;p&gt;You should remove these third party requests:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They will skew the percentiles of your performance results.&lt;/li&gt;
&lt;li&gt;You may be unable to affect the performance of the third-party service.&lt;/li&gt;
&lt;li&gt;The load test may violate the terms-of-service contract that you have with the provider.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your k6 script can skip third-party requests in a few ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Edit the auto-generated k6 script, removing the requests one-by-one&lt;/li&gt;
&lt;li&gt;Download a HAR file with only requests to the selected domains.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In Chrome, you can use the DevTools Network Filter to select only particular domains.
The Filter input accepts a Regex to match multiple domains.&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;/loadimpact.com|cloudfront.net/&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/session_recorder_filter_domain.png&#34;
  alt=&#34;Save HAR filter domain using regex&#34; width=&#34;600&#34;
     height=&#34;147&#34;/&gt;&lt;/p&gt;
&lt;p&gt;After filtering your selected domains, you can download the HAR file as described in the first step of this tutorial.
The HAR file will include only the requests to the selected domains.&lt;/p&gt;
&lt;p&gt;If you don&amp;rsquo;t know all the domains to filter, it helps to use the query language of the Network Filter.
Just input &lt;code&gt;domain:&lt;/code&gt; in the filter to see all the different domains recorded by the Network Panel.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;/media/docs/k6-oss/session_recorder_filter_domain_list.png&#34;
  alt=&#34;Save HAR filter domain list&#34; width=&#34;297&#34;
     height=&#34;400&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;correlate-dynamic-data&#34;&gt;Correlate dynamic data&lt;/h3&gt;
&lt;p&gt;In load testing, &lt;em&gt;correlation&lt;/em&gt; is when you extract the value from the response of one request and reuse it in a subsequent request.
Often, the correlation would be for a token or ID that is needed to run a sequence of steps in a user journey.&lt;/p&gt;
&lt;p&gt;The recorded HAR file may include dynamic data used on your site - &lt;code&gt;IDs&lt;/code&gt;, &lt;code&gt;CSRF tokens&lt;/code&gt;, &lt;code&gt;VIEWSTATE&lt;/code&gt;, &lt;code&gt;wpnonce&lt;/code&gt;, and other &lt;code&gt;dynamic values&lt;/code&gt; - that will be converted into the k6 script.&lt;/p&gt;
&lt;p&gt;To run your load test correctly, you may need to replace some recorded data with dynamic data that k6 gets from previous requests.
For example, tokens expire quickly, and they are one of the most common things that users will correlate from a recorded session.&lt;/p&gt;
&lt;p&gt;
    &lt;a href=&#34;/docs/k6/v2.3.x/examples/correlation-and-dynamic-data/&#34;&gt;Here&lt;/a&gt; are a few examples using the k6 API to correlate dynamic data.&lt;/p&gt;
&lt;h2 id=&#34;4-run-the-test&#34;&gt;4. Run the test&lt;/h2&gt;
&lt;p&gt;Now, you can run your load test with k6. If you have not installed k6 yet, please, follow the 
    &lt;a href=&#34;/docs/k6/v2.3.x/set-up/installation/&#34;&gt;k6 installation instructions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Execute the &lt;code&gt;k6 run&lt;/code&gt; command to run your k6 script:&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 loadtest.js&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;To learn about running k6, check out the 
    &lt;a href=&#34;/docs/k6/v2.3.x/get-started/running-k6/&#34;&gt;Running k6 tutorial&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h1 id="using-the-har-converter">Using the HAR converter&lt;/h1>
&lt;p>The &lt;a href="https://github.com/k6io/har-to-k6" target="_blank" rel="noopener noreferrer">har-to-k6 converter&lt;/a> is a NodeJS tool that generates a k6 script based on the HTTP requests included in a &lt;a href="https://en.wikipedia.org/wiki/HAR_%28file_format%29" target="_blank" rel="noopener noreferrer">HAR file&lt;/a>.&lt;/p></description></item></channel></rss>