What is the difference between the HTTP link captured using K6 browser recorder and API end point

Hi I am new with both load testing and also using K6, I really need some help to clarify my confusion. I recorded a test script for my performance testing using K6 browser recorder and after I ended the recording, I make some changes using Script Editor.

But I just realized that the HTTP requests captured by the recorder are different from my API end points. I noticed that the HTTP are the page of my website not the API endpoint.

Can someone explain to me, if I want to run a performance testing, which link I should use? do I need to write a test script to test every API endpoints of use the recorded test script? Thank you in advance

If this is a single-page application, you may need to test both the website URLs and the underlying API requests. The website URLs may be directly loading static content but when the application runs in a browser, chances are some Javascript will execute the API requests, perhaps even in parallel. These requests completing might be the bulk of data on some pages and thus critical to the end-user experience.

Iā€™m not sure what the latest recorder will capture (the Grafana k6 Browser Recorder) but there are probably settings to control the filtering. Alternatively, try Fiddler Proxy or even the latest Chrome browser, capture all of the needed requests from your application, and save as HAR output, there are HAR-to-k6 conversion utilities.

1 Like