📖What you will learn
- How to create realistic test scripts that capture a typical user journey in your system
- How to use the k6 Chrome Extension to record a browser session
So, you want to load test your website or web application to see if it will handle the expected normal and peak user traffic. How can you create a realistic test script that captures a typical user journey in your app?
The easiest way to do this is to record a browser session. Use a tool such as the Load Impact k6 Test Script Recorder, available in the Chrome Web Store.
The Load Impact k6 Test Script Recorder allows you to capture a typical user session simply by browsing like a user would on your site, or by doing various tasks in your web app. It will capture everything – every single HTTP(s) request being generated by the browser as you click – including ads, images, documents, etc., so you get a far more accurate test of your site or app.
The recorder will not record other browser tabs or pop up windows. If you need to capture this type of activity, you should check out this article: How to convert HAR to k6 test.
Open the recorder by clicking on the Load Impact icon in the upper right corner of your browser window, press "Start recording,” and start browsing in your current browser tab.
When done browsing, click "Stop" recording. You'll be taken to the Load Impact app to review the test script.
To create your k6 account click here
Save the recorded test script in any of your k6 projects, review the code and click "run."