RemoteLaunch with Command-line Tools

Tuesday, February 19, 2013
Avatar
Hi,
I'm trying to run a test script from Robot Framework using RemoteLaunch with command-line tools. I'm missing something in the Filename field because i'm getting the following error: "Parsing C:\Windows\system32\${filename}" failed.

Filename: C:\Python27\Scripts\pybot.bat | ${filename} |

What i'd like to do is run pybot.bat with the name of the file i uploaded to attachment (which is widgets.txt).
How can i achieve that? The file wasn't supposed to be downloaded and the name replaced in that ${filename} field?
Thanks
3 Replies
Wednesday, February 20, 2013
Avatar
re: criticalsoftware Tuesday, February 19, 2013

The ${filename} part only works when the test script is attached to the script in the text box part of the Automation tab. It won't substitute it for general SpiraTest attachments.

I'd suggest logging a help desk ticket if you have any questions.

Regards

Adam

Tuesday, January 2, 2024
Avatar
Monday, March 18, 2024
Avatar
re: criticalsoftware Tuesday, February 19, 2013

Instead of directly specifying "${filename}" in the Filename field, you need to pass the actual filename "widgets.txt". Since you mentioned that you don't want the file to be downloaded, you can't directly reference it in the Filename field.

However, you can achieve this by passing the filename as an argument when running the Robot Framework test script. Here's an example command you can use in the command-line tools:

C:\Python27\Scripts\pybot.bat your_test_script.robot --variable filename:widgets.txt

In this command:

  • Replace "your_test_script.robot" with the actual filename of your Robot Framework test script.
  • "--variable filename:widgets.txt" sets a variable named "filename" with the value "widgets.txt". This variable can then be accessed within your test script.

Within your Robot Framework test script, you can access the filename using the ${filename} variable, like this:

*** Settings ***
Variables    widgets.txt

*** Test Cases ***
Example Test
    Log    The filename is: ${filename}
    # Add your test steps here

Spira Helps You Deliver Quality Software, Faster and With Lower Risk

And if you have any questions, please email or call us at +1 (202) 558-6885

 

Statistics
  • Started: Tuesday, February 19, 2013
  • Last Reply: Monday, March 18, 2024
  • Replies: 3
  • Views: 5657