When I launch a test from VS Code (/w RF Language Server extension), output files are stored to project root. How do I change the outputdir, didn’t find any setting to control this?
Using the Robot Framework Language Server extension, you can set command line arguments for robot in a vscode launch.json file to change where the report, log, and outputs of your test run live.
In my example below, it’s the -d argument, and it redirects the MyExecutionFolderHere/tests/robot/reports/.
Note that for some reason, if you put a space between -d and your folder path, that space is included in the folder path, which is bad. Also, note that the folder path you specify will be relative to your execution directory. And for some reason the long version of the argument, --outputdir doesn’t seem to work…
(Robot Framework Language Server v1.12.1 prerelease, Python 3.10.12, Robot Framework 7.1, Running on Windows Subsystem for Linux)
{
"version": "0.2.0",
"configurations": [
{
"type": "robotframework-lsp",
// This name is required by the robot framework extension for some reason https://github.com/robocorp/robotframework-lsp/issues/1074#issuecomment-2288951860
"name": "Robot Framework: Launch Template",
"request": "launch",
"cwd": "^\"\\${workspaceFolder}\"",
"target": "^\"\\${file}\"",
"terminal": "integrated",
"env": {},
"args": [
"-dtests/robot/reports/",
]
}
]
}