{"record":{"id":"dae77730f34466af","repo":"grafana/k6","slug":"either-startvus-or-one-of-the-stages-target-value","errorCode":null,"errorMessage":"either startVUs or one of the stages' target values must be greater than 0","messagePattern":"either startVUs or one of the stages' target values must be greater than 0","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/executor/ramping_vus.go","lineNumber":92,"sourceCode":"}\n\n// GetDescription returns a human-readable description of the executor options\nfunc (vlvc RampingVUsConfig) GetDescription(et *lib.ExecutionTuple) string {\n\tmaxVUs := et.ScaleInt64(getStagesUnscaledMaxTarget(vlvc.StartVUs.Int64, vlvc.Stages))\n\treturn fmt.Sprintf(\"Up to %d looping VUs for %s over %d stages%s\",\n\t\tmaxVUs, sumStagesDuration(vlvc.Stages), len(vlvc.Stages),\n\t\tvlvc.getBaseInfo(fmt.Sprintf(\"gracefulRampDown: %s\", vlvc.GetGracefulRampDown())))\n}\n\n// Validate makes sure all options are configured and valid\nfunc (vlvc RampingVUsConfig) Validate() []error {\n\terrors := vlvc.BaseConfig.Validate()\n\tif vlvc.StartVUs.Int64 < 0 {\n\t\terrors = append(errors, fmt.Errorf(\"the number of start VUs can't be negative\"))\n\t}\n\n\tif getStagesUnscaledMaxTarget(vlvc.StartVUs.Int64, vlvc.Stages) <= 0 {\n\t\terrors = append(errors, fmt.Errorf(\"either startVUs or one of the stages' target values must be greater than 0\"))\n\t}\n\n\terrors = append(errors, validateStages(vlvc.Stages)...)\n\terrors = append(errors, validateTargetShifts(vlvc.StartVUs.Int64, vlvc.Stages)...)\n\n\treturn errors\n}\n\n// getRawExecutionSteps calculates and returns as execution steps the number of\n// actively running VUs the executor should have at every moment.\n//\n// It doesn't take into account graceful ramp-downs. It also doesn't deal with\n// the end-of-executor drop to 0 VUs, whether graceful or not. These are\n// handled by GetExecutionRequirements(), which internally uses this method and\n// reserveVUsForGracefulRampDowns().\n//\n// The zeroEnd argument tells the method if we should artificially add a step\n// with 0 VUs at offset sum(stages.duration), i.e. when the executor is","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/lib/executor/ramping_vus.go#L74-L110","documentation":"Raised by RampingVUsConfig.Validate when both startVUs and every stage target are zero (or unset), meaning the scenario would run with no VUs at all and produce no useful load.","triggerScenarios":"Thrown at lib/executor/ramping_vus.go:92 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set startVUs to at least 1","Give one of the stages a target greater than 0"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}