k6: [ERROR] Cannot load test script – threshold evaluation with missing tags
27.5K reputation · 28 Nov 2025, 15:00 UTC
Goal
Determine how k6 evaluates tag‑based thresholds when the referenced tag is absent from a metric, and whether the script loader error path influences that evaluation.
Constraints & Uncertainty
The documented error string “k6: [ERROR] Cannot load test script” is used to trigger the loader failure, but the impact on threshold processing is not clearly documented. Older k6 releases silently ignore thresholds that reference a non‑existent tag, while newer releases may emit a warning. It is unclear if the loader error disables threshold evaluation entirely or if thresholds are still processed after the error.
Specific Questions
- Does k6 emit a warning or log entry when a tag‑based threshold refers to a tag that does not exist in any metric?
- Is there a supported configuration or flag to force evaluation of tag‑based thresholds even when the tag is missing?
- Can we programmatically detect that a threshold was ignored due to a missing tag, for example by inspecting the engine’s internal state or output?