k6-docs-tactile


Home > k6 > group

group() function

Run code inside a group.

Signature:

export function group<T>(name: string, fn: () => T): T;

Parameters

Parameter Type Description
name string Name of the group.
fn () => T Group body. Code to be executed in the group context.

Returns:

T

The return value of fn.

Remarks

Groups are used to organize results in a test.