You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--parseinclude with multiple data sources fails with "Suite '...' contains no tests or tasks" #5826
When Robot Framework runs multiple data sources and --parseinclude selects files from only some of them, execution fails because the other data sources contain no tests.
Example project with two data sources:
api/
└── login.robot
web/
└── checkout.robot
api/login.robot:
*** Test Cases ***Login Works
Log Logging in
web/checkout.robot:
*** Test Cases ***Checkout Works
Log Checking out
Running both data sources works, and so does selecting the file when running only one data source:
robot api web # 2 tests, 2 passed
robot --parseinclude web/checkout.robot web # 1 test, 1 passed
Selecting the same file while running both data sources fails:
$ robot --parseinclude web/checkout.robot api web
[ ERROR ] Suite 'Api' contains no tests or tasks.
I would expect this to run Checkout Works, just like with a single data source. The run should only fail if none of the data sources contains a selected test, for example with robot --parseinclude nothing.robot api web.
This shows up, for example, in RobotCode, which uses --parseinclude when a single test or suite is run from the editor, so that only the needed files are parsed. In projects with several data sources, this currently fails.
Cause
With multiple data sources, Robot Framework checks that each of them contains tests (code). With --parseinclude, a data source without selected files is always empty, so this check fails.
Up to Robot Framework 6.0, --suite also limited which files were parsed, and the check was skipped in that case (6.0.2). Robot Framework 6.1 moved that job to the new --parseinclude option (#4687, #4688), but the check is not skipped for it. The problem therefore exists since Robot Framework 6.1.
Possible fix
When --parseinclude is used, check only that the run as a whole contains tests, not each data source separately. I tried this locally: the example above runs Checkout Works, and robot --parseinclude nothing.robot api web still fails, now with Suite 'Api & Web' contains no tests or tasks.
Versions
Tested with Robot Framework 7.5 (Python 3.14) and the current master (d35ab51, Python 3.13).
I'll submit a pull request with a fix and acceptance tests.
AI/tooling disclosure: This issue was prepared with assistance from Claude Code. I reviewed the result manually, understand the reported problem, and verified it locally.
Activity