Why the value is not assigned to the variables in the second execution of the test?

Hello, I am using RIDE 2.0. When I do a test with all test cases it goes well but when I repeat the test the variables of the test cases are not assigned correctly and it leaves them empty which causes the test cases to fail.

Thank you for your help

Without seeing your code - i dont think people will be able to give you any good answers.

1 Like

This is an example of one of the test cases where after executing the command in Python it returns a value. Well, the second time the test is done, that value is not saved by the variable ‘return’
image

Please try to confirm that the problem is not caused by RIDE. Execute your test in the command line.
You should also use the --loglevel TRACE option to Robot Framework.

You you should indicate the exact versions of:

  • Python: python --version
  • Robot Framework: robot --version
  • The first lines of RIDE->Tools-View RIDE Log

Thanks

The problem is RIDE . The python command give always a number

I highly doubt the issue is with “variable is not set”. Since you blurred out the name of the script you are running, are you 100% that the Execute Command runs that one ? For example, if any part of your code changes the working directory during the execution, that script execution could fail as the script is not found anymore ?

The python command works correctly and returns a value, the problem is that ‘return’ does not take that value on the second execution of the test.

Well, you did not provide the info I asked.

Depending on how you are running RIDE, it may not use the same robot version as you do from command line.

is the same version:

-Python 3.10.0
-robotframework 6.0.2
robotframework-ride 2.0

RIDE version 2.0 is very old. The latest released version is 2.0.8.1.

And I announced yesterday the release of Alpha version 2.1a3 (it would be nice if you could prepare a virtual environment, install robot and libraries and test this version of RIDE with the interface in Spanish).

Try to run in RIDE with the option --loglevel TRACE in the Arguments field. See if the Execute Command can show detailed errors or output.

The error is in ‘Builtln should not be empty’ because the value is not saved by the variable ‘return’

We knew that already, we are trying to understand why.

Since it something with the Execute Command I was trying to narrow to that step.
I really find strange RIDE causing problems in the second execution. Even so, if it is a bug in RIDE, you should try to see if still happens in 2.0.8.1 (and I recommend 2.1a3).

If it is really important, then use RIDE only to write and edit test cases, run them from command line.