Skip to content
Latchkey

Molecule "scenario not found" in CI

Molecule scenarios are subfolders of molecule/. When you pass -s <name>, Molecule looks for molecule/<name>/molecule.yml. A typo or a scenario that only exists in another role makes Molecule report the scenario as missing.

What this error means

Molecule fails with "Scenario 'X' not found. Exiting." after a molecule test -s X invocation.

Molecule
CRITICAL Scenario 'integration' not found. Exiting.

Common causes

The scenario name is misspelled

The -s value does not match a folder under molecule/, so Molecule finds no matching scenario.

The scenario lives in a different role

In a collection with multiple roles, the named scenario exists under another role, not the current working directory.

How to fix it

List scenarios, then pass an exact name

  1. Run molecule list from the role directory to see valid scenario names.
  2. Pass the exact folder name to -s.
  3. Confirm each has a molecule.yml.
Terminal
molecule list
molecule test -s default

Create the scenario if it should exist

Scaffold the missing scenario so its folder and config exist.

Terminal
molecule init scenario integration

How to prevent it

  • Reference scenario names from a matrix that reads molecule list.
  • Keep scenario folder names stable and documented.
  • Run Molecule from the correct role directory before selecting a scenario.

Frequently asked questions

What causes ""scenario 'X' not found""?
The -s value does not match a folder under molecule/, so Molecule finds no matching scenario.
How do I fix "scenario 'X' not found"?
List scenarios, then pass an exact name

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card