Description
For me it is a bug, but maybe I misunderstand something.
I am used to run Robot Framework scripts from VS Code by selecting 1 script or all scripts in a file by clicking on the green arrow on left side of the test script. I use for my testscripts the normal Testcase style, but also the Gherkin feature style.
When I run a test script in this way a command will be created automatically and this will be executed on the terminal (command line) in VS Code. This worked always fine, but since RobotCode versie 2.6.0 I miss in this command the option -I. ('-I' 'keyworduse/testje.robot' ) This causes that Robot Framework is widening its scope and all kind of errors appear.
Examples of the command that is created by RobotCode for Robot Framework and the resulting errors:
Robot Code version 2.5.1
PS C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel> & 'c:\Users\USER\AppData\Local\Programs\Python\Python314\python.exe' 'c:\Users\USER.vscode\extensions\d-biehl.robotcode-2.5.1\bundled\tool\robotcode' '-dp' '.' 'debug' '--no-debug' '--tcp' '59384' '--' '-d' 'results' '-I' 'keyworduse/testje.robot' '-N' 'RobotDemo-master-Probeersel' '-s' 'RobotDemo-master-Probeersel.Keyworduse.Testje' '-bl' 'RobotDemo-master-Probeersel.Keyworduse.Testje.Testcase1'
Robot Code version 2.6.2
PS C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel> & 'c:\Users\USER\AppData\Local\Programs\Python\Python314\python.exe' 'c:\Users\USER.vscode\extensions\d-biehl.robotcode-2.6.2\bundled\tool\robotcode' '-dp' '.' 'debug' '--no-debug' '--tcp' '61318' '--' '-d' 'results' '-s' 'RobotDemo-master-Probeersel.Keyworduse.Testje' '-bl' 'RobotDemo-master-Probeersel.Keyworduse.Testje.Testcase1'
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\data_driven_met_keywords.robot' on line 14: Setting 'Test Template' is allowed only once. Only the first value is used.
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\Gherkin\gherkin voorbeeld.robot' on line 12: Creating keyword 'Example' failed: Invalid argument specification: Invalid argument syntax '${kop} ${periodClosed}'.
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\Gherkin copy\gherkin voorbeeld.robot' on line 12: Creating keyword 'Example' failed: Invalid argument specification: Invalid argument syntax '${kop} ${periodClosed}'.
This problem appears at my home computer and at my work computer. It is also a reproducible issue. Installing back and forward the old and new version of RobotCode doesn't change the behaviour for each specific version.
Desktop - at home:
- VS Code Version 1.126.0
- RobotCode Version 2.6.0/2.6.1/2.6.2
- OS: [e.g. Windows 11
- Python Version 3.14
- RobotFramework Version 7.4.2
Desktop - at work:
- VS Code Version 1.126.0
- RobotCode Version 2.6.0/2.6.1/2.6.2
- OS: [e.g. Windows 11
- Python Version 3.13
- RobotFramework Version 7.4.2
Description
For me it is a bug, but maybe I misunderstand something.
I am used to run Robot Framework scripts from VS Code by selecting 1 script or all scripts in a file by clicking on the green arrow on left side of the test script. I use for my testscripts the normal Testcase style, but also the Gherkin feature style.
When I run a test script in this way a command will be created automatically and this will be executed on the terminal (command line) in VS Code. This worked always fine, but since RobotCode versie 2.6.0 I miss in this command the option -I. ('-I' 'keyworduse/testje.robot' ) This causes that Robot Framework is widening its scope and all kind of errors appear.
Examples of the command that is created by RobotCode for Robot Framework and the resulting errors:
Robot Code version 2.5.1
PS C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel> & 'c:\Users\USER\AppData\Local\Programs\Python\Python314\python.exe' 'c:\Users\USER.vscode\extensions\d-biehl.robotcode-2.5.1\bundled\tool\robotcode' '-dp' '.' 'debug' '--no-debug' '--tcp' '59384' '--' '-d' 'results' '-I' 'keyworduse/testje.robot' '-N' 'RobotDemo-master-Probeersel' '-s' 'RobotDemo-master-Probeersel.Keyworduse.Testje' '-bl' 'RobotDemo-master-Probeersel.Keyworduse.Testje.Testcase1'
Robot Code version 2.6.2
PS C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel> & 'c:\Users\USER\AppData\Local\Programs\Python\Python314\python.exe' 'c:\Users\USER.vscode\extensions\d-biehl.robotcode-2.6.2\bundled\tool\robotcode' '-dp' '.' 'debug' '--no-debug' '--tcp' '61318' '--' '-d' 'results' '-s' 'RobotDemo-master-Probeersel.Keyworduse.Testje' '-bl' 'RobotDemo-master-Probeersel.Keyworduse.Testje.Testcase1'
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\data_driven_met_keywords.robot' on line 14: Setting 'Test Template' is allowed only once. Only the first value is used.
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\Gherkin\gherkin voorbeeld.robot' on line 12: Creating keyword 'Example' failed: Invalid argument specification: Invalid argument syntax '${kop} ${periodClosed}'.
[ ERROR ] Error in file 'C:\Users\USER\Documents\Tool projecten\Robot Framework Verzamelmap\RobotDemo-master-Probeersel\Gherkin copy\gherkin voorbeeld.robot' on line 12: Creating keyword 'Example' failed: Invalid argument specification: Invalid argument syntax '${kop} ${periodClosed}'.
This problem appears at my home computer and at my work computer. It is also a reproducible issue. Installing back and forward the old and new version of RobotCode doesn't change the behaviour for each specific version.
Desktop - at home:
Desktop - at work: