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
Fail the Dryrun when keyword not found (embedded arguments, argument as keyword name) #5231
When I execute normally, Demo2 gets failed. But when I use the dryrun option, even though "blahblah" keyword is not to be expected as a keyword, Demo2 is pass.
I want the list of valid_methods to be treated as valid methods along with parameter check in the dryrun, so that "blahblah" usage is detected as wrong usage and fails the dryrun.
changed the title [-]Fail the Dryrun when keyword not found ?[/-][+]Fail the Dryrun when keyword not found (embedded arguments, argument as keyword name)[/+]on Oct 9, 2024
Is there any easy way to extract all keywords used in robot file and validate with the self.valid_methods list ?
That would be really helpful in case of dry run.
Keywords aren't run in the dry-run mode so that's why your explicit check isn't executed. If you know the keyword names beforehand, as it seems, you can construct the keyword name so that only the specified keyword will match:
The problem with the above is that if the you use the keyword in different case like Call_func1 instead of call_func1, you'll get a warning about that. That could be avoided by making the match case-insensitive by prefixing the pattern with a (?i) group, but at the moment Robot doesn't allow any regexp extensions like that. That limitation could be lifted, though, and I'll submit a separate issue about it.
If you have further questions, please use our Slack or Forum. This issue tracker is for bug reports and enhancement requests.
Activity
[-]Fail the Dryrun when keyword not found ?[/-][+]Fail the Dryrun when keyword not found (embedded arguments, argument as keyword name)[/+]Abhiramborige commentedon Oct 9, 2024
Is there any easy way to extract all keywords used in robot file and validate with the self.valid_methods list ?
That would be really helpful in case of dry run.
pekkaklarck commentedon Oct 18, 2024
Keywords aren't run in the dry-run mode so that's why your explicit check isn't executed. If you know the keyword names beforehand, as it seems, you can construct the keyword name so that only the specified keyword will match:
The problem with the above is that if the you use the keyword in different case like
Call_func1instead ofcall_func1, you'll get a warning about that. That could be avoided by making the match case-insensitive by prefixing the pattern with a(?i)group, but at the moment Robot doesn't allow any regexp extensions like that. That limitation could be lifted, though, and I'll submit a separate issue about it.If you have further questions, please use our Slack or Forum. This issue tracker is for bug reports and enhancement requests.
Abhiramborige commentedon Oct 18, 2024
@pekkaklarck thanks for that!. It was helpful