Performance testing web URL

Hey guys, I would like to get your opinions, what do you think of testing the original web url, instead of api or api endpoints.

Like the exact link which shows all the buttons with images etc.
When we would send hundreds of VU’s to git get request, would data be accurate ?

It wont affect the API’s inside the url right ? (in example, take google.com, if you send requests to it, will it affect other functions it has on screen ?)

Would it be correct way to test main page url with simple get request, and perhaps body check/content check ?

Hi @sillymoomoo !

It wont affect the API’s inside the url right ? (in example, take google.com, if you send requests to it, will it affect other functions it has on screen ?)

You’re correct. For instance, an example below will request only test.k6.io and won’t request additional static documents like CSS, JS, etc.

import http from 'k6/http';

export default function () {
  http.get('https://test.k6.io');
}

To simulate user behavior, you can record the session, covert it to the k6 script, and run the test.

There is also another project GitHub - grafana/xk6-browser: k6 extension that adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol that can make testing websites more manageable, but it’s still under development.

Would it be correct way to test main page url with simple get request, and perhaps body check/content check ?

On the other note, testing even a single endpoint can give a lot of insights about performance since sometimes it can contain the heaviest logic, so in my opinion, it still makes sense :smile:

Hope that helps,
Cheers!

1 Like