Closed simonmeggle closed 2 months ago
ok, this seems to be a problem in the RobotFramework itself, if you use a prerunmodifier and set the name of the suite via the command line, the prerunmodifier is executed first and then the name of the suite is changed.
The debugger/runner in VSCode needs a way to run testcases with long names (e.g. suite.subsuite.subsuite.testcase1
) because the --test
argument uses wildcards, is case insensitive and so on. But you can have test cases with same names that are only differs in case or space count. At runtime there is only a warning, but all test cases are executed.
I think that changing the name, doc and metadata and test tags (see the corresponding command line arguments) of the suite should be done before calling the pre-run modifiers. And I think we need to create an issue for the robot framework ;-)
@simonmeggle, if you have the time and inclination, maybe you can create this issue?
You can use this modifier as an example: https://github.com/robotcodedev/robotcode/blob/main/packages/modifiers/src/robotcode/modifiers/longname_modifiers.py
if not, then it needs some time ;-)
And by the way, there is also the new Name
setting of the suite, see here https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#suite-name
Thanks a lot for investigating so far, Daniel. I will take care for this.
Describe the bug Inconsistency between possibilities on CLI and robot.toml.
To Reproduce Steps to reproduce the behavior:
example.robot
Suite name from filename:
Set suite name with --name:
Setting --name with robot.toml fails: robot.toml
As Robotcode takes the cwd as root suite, I also tried:
Result:
Expected behavior I expect setting the suite name in robot.toml as it is possible on the CLI.
Desktop (please complete the following information):
Additional comment I am not sure if this is really a bug. But I guess for Robotcode the "root" suite seems to be the parent folder (Minimal) - on the CLI it is the robot file itself.