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
Skip Non‑Existing Test Paths Support for Robot Command #5690
This is essentially a feature request (or feature greenlight). It appears that the robot command fails completely if any of the provided test paths do not exist. As a result, if you accidentally include a missing file or directory, the entire execution stops, even tough it could have executed it for the other files.
While we can avoid running empty suites or non‑suites using --runemptysuite, there is currently no option to simply skip non‑existing files.
A solution to handle this could be to wrap the command in a script that checks file existence beforehand, but this still leaves a potential TOCTOU issue (the file might be deleted between the check and the actual execution).
Would it be possible to introduce a flag that instructs Robot Framework to skip missing files—for example, something like --skipnonexisting?
I’m willing to look into implementing this myself if the idea is considered acceptable (I haven't checked yet the code itself).
Some more information from my first investigations:
A simpler solution could be "--skiponfailure". I see that the test files are passed on run.py and that suites are extracted at line 479 with
suite=builder.build(*datasources)
builder is a TestSuiteBuilder from robot.running.builder
Then the following is called:
I'm not sure how useful this would be in practice. If you run tests from the command line yourself and some files/directories don't exist, I would expect it to be easier to just fix the situation than to add a new command line option to the invalid run. Or do you always plan to run tests with robot --the-new-option ... instead of just robot ...? If this happens on automatic execution, validating that files/directories actually exists isn't hard as you also commented. There's the potential issue that files/directories are removed before the execution actually starts, but is this something that has really happened to you? I would consider such situation a problem to be fixed in itself.
In some cases I do plan to run with --the-new-option. As you clearly identified, it is a case for automatic execution.
The problem is to be put in perspective with its impact. It is indeed unlikely that a file will be deleted in between running the command and executing. And fixing it isn't hard when running manually. But should it happen, it's the whole run which will fail. Skipping failing tests allows one to cope with such situations.
Overall failing the whole test for one missing file seems a bit of a radical solution (although, for some cases, I can imagine it making sense). That's why I don't propose to change the default behavior but only to add an option for these special cases. Adding more possibilities to the command.
This is not something that really happened to me, but it is something that would be annoying should it happen. That’s why I’m trying to see if there is a way for it to be avoided.
In my case, I’m checking syntax with --dryrun with a background task. But you can imagine similar scenarios for CI/CD pipeline overnight where one test file disappears with nobody that would be able to relaunch at that time. Yes, we can add a file check, but only a change to the command could avoid this TOCTOU situation.
Activity
Symeon94 commentedon Jun 26, 2026
Some more information from my first investigations:
A simpler solution could be "--skiponfailure". I see that the test files are passed on
run.pyand that suites are extracted at line 479 withbuilderis aTestSuiteBuilderfromrobot.running.builderThen the following is called:
These are then passed to
SuiteStructureParser(inrobot/running/builderbuilders.py) in function_build_suite_fileat line 289:We could simply discard the suite (or replace it with an empty suite) when this error occurs if an option is set.
pekkaklarck commentedon Jul 5, 2026
I'm not sure how useful this would be in practice. If you run tests from the command line yourself and some files/directories don't exist, I would expect it to be easier to just fix the situation than to add a new command line option to the invalid run. Or do you always plan to run tests with
robot --the-new-option ...instead of justrobot ...? If this happens on automatic execution, validating that files/directories actually exists isn't hard as you also commented. There's the potential issue that files/directories are removed before the execution actually starts, but is this something that has really happened to you? I would consider such situation a problem to be fixed in itself.Symeon94 commentedon Jul 6, 2026
In some cases I do plan to run with
--the-new-option. As you clearly identified, it is a case for automatic execution.The problem is to be put in perspective with its impact. It is indeed unlikely that a file will be deleted in between running the command and executing. And fixing it isn't hard when running manually. But should it happen, it's the whole run which will fail. Skipping failing tests allows one to cope with such situations.
Overall failing the whole test for one missing file seems a bit of a radical solution (although, for some cases, I can imagine it making sense). That's why I don't propose to change the default behavior but only to add an option for these special cases. Adding more possibilities to the command.
This is not something that really happened to me, but it is something that would be annoying should it happen. That’s why I’m trying to see if there is a way for it to be avoided.
In my case, I’m checking syntax with
--dryrunwith a background task. But you can imagine similar scenarios for CI/CD pipeline overnight where one test file disappears with nobody that would be able to relaunch at that time. Yes, we can add a file check, but only a change to the command could avoid this TOCTOU situation.