MartinX
(Martin Xiao)
14 March 2024 11:27
1
Hi again,
My second post here,
I’m using RobotCode with VSCode
I’ve got most of the things up and running now, except being able to run and use debug.
When I go inside my .robot file and right click and choose run current file. I get ‘No Test found in this file’
Can someone help me with this?
Are there some set ups that I’ve missed?
BR
MartinX
Many
(Many Kasiriha)
14 March 2024 11:32
2
Open the “Testing” view in VS Code and check your tests are listed there or if some error message is shown.
Typical errors I saw in the past that caused problems:
Mixture of “Tasks” and “Tests” within a project.
Some files in the project which cannot be read/accessed by RobotCode extension.
MartinX
(Martin Xiao)
14 March 2024 12:15
3
Ty Many for your quick response,
Yeah I found some issues with me parsing arguments, so I removed said arguements.
But now when I run, I instead get ‘The test run did not record any output’
BR
MartinX
daniel
(Daniel Biehl)
15 March 2024 10:31
4
where do you get this message? Can you maybe make a screenshot?
MartinX
(Martin Xiao)
15 March 2024 10:51
5
I’ve been playing around with it alot lately, so now I’m back with “No Test found in this file”
My “Testing” view is unconfigured
So I’m back on square one for running the test test directly from vs code.
What do I need to make it work?
Normally when we simply run this TC we use the following:
robot --loglevel DEBUG:DEBUG -A ~/.autotest/mytest/robot_env.arg --variable ERP:IIP -i TC78755 .
we have this robot_env.arg file where we have the information to our SUT.
BR
MartinX
daniel
(Daniel Biehl)
15 March 2024 11:13
6
What exactly are you trying to configure?
Or rather, what problems do you have exactly?
What does your argument file look like?
daniel
(Daniel Biehl)
15 March 2024 11:20
7
I gave a short tutorial at RoboCon on how to set up and configure RobotCode. And also some information about the new robot.toml
file with which you can configure RobotCode, but also the execution on the command line. Maybe this is interesting for you:
1 Like
MartinX
(Martin Xiao)
15 March 2024 12:09
8
I want to be able to run and debug my Testcases in vscode.
These are my installed extenssions:
What I have working, are intellisense, linting (robocop) and formatting (robotidy).
My argument file is just a bunch of variables needed to connect to my SUT:
BR
MartinX
daniel
(Daniel Biehl)
15 March 2024 22:10
9
Ok, which Vscode/Robotcode settings have you changed?
MartinX
(Martin Xiao)
18 March 2024 11:16
10
Ty for your response,
This is my setting.json
From .config/Code/User
{
“files.encoding”: “iso885915”,
“C_Cpp.workspaceParsingPriority”: “medium”,
“update.showReleaseNotes”: false,
“[robotframework]”: {
“editor.wordBasedSuggestions”: “off”,
“editor.semanticHighlighting.enabled”: true,
“editor.inlayHints.enabled”: “offUnlessPressed”,
“editor.quickSuggestions”: {
“strings”: “on”
},
“editor.defaultFormatter”: “d-biehl.robotcode”
},
“robotcode.robot.env”: {
“RESOURCEPATH”: “/home/masys/ikea_sture/common-resources”,
“IKEARESOURCEPATH”: “/home/masys/ikea_sture/autotest/ikea-resources”
},
“robotcode.robot.paths”: [
“/home/masys/ikea_sture/autotest/ikea-tests”
],
“robotcode.debug.defaultConfiguration”: {},
“robotcode.robocop.exclude”: [
“too-long-test-case”
],
“robotcode.robotidy.config”: “/home/masys/ikea_sture/autotest/pyproject.toml”,
“workbench.settings.applyToAllProfiles”: [
“robotcode.robocop.configurations”
],
“robotcode.robot.args”: [
“/home/masys/.autotest/mytest/robot_env.arg”
],
“robotcode.debug.attachPython”: true,
“robotcode.debug.useExternalDebugpy”: true
}
I’ve also watched the video you mentioned. It seemed so easy to set up from scratch. But there i no mention how to adapt everything to an existing workspace.
BR
MartinX
MartinX
(Martin Xiao)
19 March 2024 10:59
11
I got this weird error in output:
I do however have Robot Framework installed
Hi @MartinX
Could it be related with the Workspace. Did you try to create a Workspace folder which have all your robot files and libraries?
Maybe this could solve the issue.
PavelKolar
(Pavel Kolar)
25 September 2024 07:54
13
Hi @MartinX
try to add full path to Robot Code settings
Robotcode > Robot:Paths