Browser Load time of last page in a test

I am doing load test for a specific page after logging in

login to app → Group1

click on a specific side menu → Group2

click on a specific tab called transaction → Group 3 Need to know browser load times for the table load in here

I generated output to a csv file and can only see browser load times from Group 1 only, but i am interested in Group 3 output

Hi there, welcome to the forum :slight_smile:

Can you share a minimal script that reproduces this?

Which specific k6 metric are you interested in?

If the “Transaction” tab loads via Ajax and no navigation happens, you wouldn’t get metrics like browser_dom_content_loaded or browser_first_paint. In that case, consider using page.waitForSelector() in the 3rd group and checking the group_duration metric.

1 Like

yes, you are right, after login, tab load calls are made via Ajax.

I am interested in table load time of a specific tab which i think i can get in group duration

i can see the group duration in the csv file generated

but excel file has multiple group duration ( 2 for each group) with different timings. I have attached a loom video, just wondering which timing( from 2 of them) should i consider

You are running 2 iterations, which is why you have 2 metrics for each group. You can consider either of them if you want a single result. Otherwise, you can aggregate the result from both (or more) iterations however you like. You can do this directly in Excel, or in another metric output system, or even in the script itself with handleSummary().

1 Like

thanks, i am interested in groups duration statitics.

Is there any way i can get this in html report, avg group duration, min and max group duration etc.

I tried using handle sumary, but its not getting recorded in json/html reports

I’m not sure what you mean. group_duration is already aggregated in the data passed to handleSummary(), and you can save it in a JSON file. It’s also shown in the summary output:

group_duration...................: avg=801.32ms min=281.13ms med=488.36ms max=1.63s    p(90)=1.4s     p(95)=1.51s
1 Like

hi @imiric,

just wanted to ask if it’s possible to add each ‘duration’ from these 3 groups in the result? let say i have below code:

export default function () {
group(‘url’, function () {
// …
});

group(‘login’, function () {
// …
});

group(‘add’, function () {
// …
});
}

Expected Output:
group_duration…:
✓ {group-url} …
✓ {group-login}…
✓ {group-add}…

Thank you in advance.

Seems i got the answer now, by backreading this convo.

thanks @imiric

1 Like

i cannot see any goup duration stats in the json output obtained through handle summary, its available in csv file. loom video attached
I am interested in metrics for a specific group, which is available through csv

@jithin I’m confused. In your previous post you mentioned you wanted avg, min and max group duration. These are aggregated statistics across all groups in your script, which are available in the data passed to handleSummary(), as your last video shows. This is the same data you see in the end-of-test summary output by default. You can create HTML reports from it or do whatever you like in handleSummary().

If you want to see unagreggated metric samples for each group, then you’ll have to use an output, like CSV or JSON. See the documentation. You can then aggregate this data however you like by processing the raw output metric samples.

1 Like

Thanks , got it imiric