n8n-io/n8n · error · Error
No scenarios found in ${args.testCasePath}
Error message
No scenarios found in ${args.testCasePath} What it means
Thrown in main() when the parsed test-case JSON contains neither an `executionScenarios` array nor a legacy `scenarios` array, so getScenarios() returns []. The script needs at least one scenario to pick a successCriteria to build the verification artifact. This is a test-case fixture defect, not a runtime/environment issue.
Source
Thrown at packages/@n8n/instance-ai/evaluations/export-latest-verifier-request.ts:324
function getSerializedTestCaseName(testCase: WorkflowTestCaseJson): string | undefined {
return getTestCasePrompt(testCase)?.slice(0, 70);
}
function getWorkflowJson(workflowId: string): WorkflowJson {
const row = querySqlite(
`select json_object('nodes', json(nodes), 'connections', json(connections)) from workflow_entity where id='${workflowId}';`,
);
if (!row) throw new Error(`Workflow ${workflowId} not found in sqlite db`);
return jsonParse<WorkflowJson>(row);
}
function main(): void {
const args = parseCliArgs(process.argv.slice(2));
const testCase = readJson<WorkflowTestCaseJson>(args.testCasePath);
const scenarios = getScenarios(testCase);
const scenarioName = args.scenarioName ?? scenarios[0]?.name;
if (!scenarioName) throw new Error(`No scenarios found in ${args.testCasePath}`);
const scenario = scenarios.find((item) => item.name === scenarioName);
if (!scenario) throw new Error(`Scenario "${scenarioName}" not found in ${args.testCasePath}`);
const evalResults = readJson<StoredEvalResults<EvalResult>>(evalResultsPath);
const storedTestCase = findStoredTestCaseResult(
evalResults,
args.testCasePath,
getSerializedTestCaseName(testCase),
);
const storedRun = findStoredVerifierRun(storedTestCase, scenarioName);
if (!storedRun) {
throw new Error(
`eval-results.json does not include a workflowId and evalResult for scenario "${scenarioName}" in test case "${getSerializedTestCaseName(testCase) ?? args.testCasePath}". Re-run the workflow evals with this branch.`,
);
}
const workflowJson = getWorkflowJson(storedRun.workflowId);
const checklist = [
{View on GitHub (pinned to 5ac6606e81)
Solutions
- Open the test-case JSON and confirm it has an `executionScenarios` array with at least one { name, successCriteria } entry.
- If using the legacy `scenarios` key, migrate it to `executionScenarios`.
- Verify --test-case-path points at the intended fixture.
Example fix
// before
{
"conversation": [{ "text": "build a report" }]
}
// after
{
"conversation": [{ "text": "build a report" }],
"executionScenarios": [
{ "name": "default", "successCriteria": "workflow executes and emits a report" }
]
} Defensive patterns
Strategy: validation
Validate before calling
// Validate the fixture shape right after reading it.
function assertHasScenarios(testCase: WorkflowTestCaseJson, filePath: string): Scenario[] {
const scenarios = testCase.executionScenarios ?? testCase.scenarios ?? [];
if (scenarios.length === 0) {
throw new Error(`No executionScenarios (or legacy scenarios) in ${filePath}; add at least one { name, successCriteria }.`);
}
return scenarios;
} Prevention
- Author test cases through the Zod schema so a missing scenario block fails at parse.
- Keep a linter that checks every fixture under evaluations/data/workflows has a non-empty executionScenarios.
When it happens
Trigger: Loading a workflow test-case JSON that omits both `executionScenarios` and `scenarios`, or where the key is misspelled / present but set to null. The default test case (cross-team-linear-report.json) is expected to define them; a new or hand-edited fixture may not.
Common situations: Authoring a new test case and forgetting the scenario block; renaming the key during a schema migration; loading the wrong JSON file via --test-case-path.
Related errors
- Scenario "${scenarioName}" not found in ${args.testCasePath}
- Reflector output did not contain a JSON object
- MCP server "${cfg.name}": exactly one of "url" or "command"
- MCP server "${cfg.name}": provide either "url" or "command",
- MCP server name "${cfg.name}" is already registered
AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12).
Data as JSON: /api/errors/9ae83a58c2e610c0.
Report an issue: GitHub.