Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manager Fails to transfer resources to agent when test resource link in windows uses "Resource ../../../Resource/file.robot #152

Closed
markro12 opened this issue Jun 14, 2023 · 2 comments
Labels
bug Something isn't working Manager Issue Affects the Manager
Milestone

Comments

@markro12
Copy link

Describe the bug

Manager fails to transfer resources to agent when using a resource link like this on windows:
Resource ../../../Resource/File_Resource.robot

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Mobile phone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@markro12 markro12 added the potential bug Might be a bug, requires further clarification label Jun 14, 2023
@damies13
Copy link
Owner

Extract from discord chat:


crashfile — Today at 20:34
Robot Test Settings Resource line:
Resource ../../../Resource/Web_Client_Resource.robot

Resource location:
\AutomationTests\WebClient.Automation.Tests\Resource\Web_Client_Resource.robot

Test Location:
\WebClient.Automation.Tests\Tests\POC_Performance_Test_RF


damies13 — Today at 20:41
can you try changing that to
Resource ..${/}..${/}..${/}Resource${/}Web_Client_Resource.robot

I think I know what might be happening and changing it to that will confirm it
Resource ..\..\..\Resource\Web_Client_Resource.robot
Should work also


crashfile — Today at 20:47
both had the same result as before.

Shoud I try ../../../Resource/Web_Client_Resource.robot

as it seems you are trying to escape the /
result as before, meaning only copied 1 file in temp


damies13 — Today at 20:53
no, what I think might be happening is the manager is constructing the path to the resource files as something like c:\Cotton\klean\kanteen../../../Resource/Web_Client_Resource.robot
but windows doesn't like it when you do that, on windows all the slashes have to go the same way. I thought I'd caught all the instances of that happeining but I might have missed one
the manager knows how to handle the robot variable for ${/} which tells robot to use the system path slash \ for windows
in a robot file you need to escape \ as \ but you don't need to escape /
I was trying to get the slashes in the window style for your resource file entry to see if that was the issue


crashfile — Today at 21:01
I'm trying to run the test, and will report back on any error message that might be helpful.


damies13 — Today at 21:08
This resource path
Resource example\example.resource.robot
On my linux machine produced this:
RFSwarmBase: find_dependancies(1339): [8:7] linearr ['Resource', 'example\\example.resource.robot'] [1.2.0 @2023-06-14 21:00:01]
RFSwarmGUI: sr_file_validate(5747): [8:7] scriptfile: /home/dave/Documents/Github/rfswarm/Tests/Demo/demo_wth_resource.robot [1.2.0 @2023-06-14 21:00:01]
RFSwarmBase: find_dependancies(1351): [8:7] resfile example\example.resource.robot [1.2.0 @2023-06-14 21:00:01]
RFSwarmBase: find_dependancies(1362): [8:7] localrespath /home/dave/Documents/Github/rfswarm/Tests/Demo/example\example.resource.robot [1.2.0 @2023-06-14 21:00:01]

When I bumped the debugging up to 8

Looks like that's the issue
Can you create a bug report on github saying something like

Manager fails to transfer resources to agent when using a resource linke like this on windows:
Resource ../../../Resource/Web_Client_Resource.robot

Then you'll get notified when I fix it


crashfile — Today at 21:10
ok will do
any work around for now ?


damies13 — Today at 21:12
safest one is to use ${/} for the paths but if you only have windows machines you can use the escaped windows paths (\) either should work I can see in the code where the problem is happening


@damies13 damies13 added bug Something isn't working Manager Issue Affects the Manager and removed potential bug Might be a bug, requires further clarification labels Jun 14, 2023
@damies13 damies13 added this to the v1.1.4 milestone Jun 14, 2023
damies13 added a commit that referenced this issue Jul 10, 2023
damies13 added a commit that referenced this issue Jul 10, 2023
@damies13
Copy link
Owner

Fix for this issue has been merged into release v1.1.4 branch, This issue will be resolved with release v1.1.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Manager Issue Affects the Manager
Projects
None yet
Development

No branches or pull requests

2 participants