grafana/k6 · error

group and check names may not contain '::'

Error message

group and check names may not contain '::'

What it means

Sentinel error (ErrNameContainsGroupSeparator) returned when a group or check name contains the '::' separator, which k6 reserves for building hierarchical group IDs. It fires from NewGroupPath or when exporting a JS object whose keys (used as group/check names) contain '::'.

Solutions

  1. Remove any '::' from group() and check() names in the script
  2. Use a single ':' or another separator character in names
  3. Rename the exported JS object keys that k6 interprets as group/check names
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at lib/models.go:29 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of grafana/k6@01ffac6f24 (2026-08-18). Data as JSON: /api/errors/25503c8f01806929. Report an issue: GitHub.

Appendix: source

Thrown at lib/models.go:29

	"time"

	"gopkg.in/guregu/null.v3"

	"go.k6.io/k6/v2/lib/types"
)

// GroupSeparator for group IDs.
const GroupSeparator = "::"

// RootGroupPath is the id of the root group
//
// Note(@mstoykov): the constant shouldn't be used in all tests in order to not couple the tests too much with it.
// Changing this will be a breaking change and in this way it will be more obvious.
const RootGroupPath = ""

var (
	// ErrNameContainsGroupSeparator is emitted if you attempt to instantiate a Group or Check that contains the separator.
	ErrNameContainsGroupSeparator = errors.New("group and check names may not contain '" + GroupSeparator + "'")

	// ErrCheckGroupIsNil is emitted if you attempt to instantiate a Check (see NewCheck) with a nil Group.
	ErrCheckGroupIsNil = errors.New("check's group must not be nil")
)

// StageFields defines the fields used for a Stage; this is a dumb hack to make the JSON code
// cleaner. pls fix.
type StageFields struct {
	// Duration of the stage.
	Duration types.NullDuration `json:"duration"`

	// If Valid, the VU count will be linearly interpolated towards this value.
	Target null.Int `json:"target"`
}

// A Stage defines a step in a test's timeline.
type Stage StageFields

View on GitHub (pinned to 01ffac6f24)