How to stop Robot execution from external command during a performance test

Hi Community,

I have a simple test that is running in a while loop, to verify a connection status (Performance test). As long, nobody else need the bench for testing, the test can run for days/weeks.
To stop the test we abort the job via Jenkins. This is inconvenient as we are not executing the tear down and are collecting all information.
My ideas to solve that Problem:

  • In the Library Dialogs a user input on the bench would be possible. But it is pausing the test execution. Is there a alternative implementation available.

  • How can we stop the execution of test script which are triggered using python scripts As understood terminate is not helping me either. As I want to execute the Teardown and the post processing of the Test Suite.

  • I was also thinking to check a local file content, in the workspace, to then stop the While loop and stop the robot test.

Any other idea would be help full for me. Thanks in advance.

I would go for this option. In your test/task loop you could have a listener or even a keyword that monitors the file system, and call the pass test execution.

I think you could also send an user signal with kill (may depend on the operating system), but this is a more complex solution.

Hi,

Indeed file and variable is the simplest.
Maybe you can also try this:
https://robotframework-thailand.github.io/robotframework-redislibrary/RedisLibrary.html

You could define a control variable, that can be updated from a command line.

Regards
Charlie

Hi Birger,

what it the condition for the while loop?

If it’s just a simple while true? I’d suggest changing it to a while time is less than end time, you can use Get Time to update the variable for the current time in the loop and use another variable for the end time that you override it’s value on the command line with something like -v end_time:15:00

Usually when you run a performance test you know how long you plan to run it for, so just make the end time of this script a short time (e.g. 1 hour) after you expect the performance test to finish

Dave.

Thanks for your fast Feeback!
I will go for the implementation of the redis library.
@damies13 Thanks for your proposal.
I was not explaining the scope for the test correct. It is more a endurance run. That should stimulate test device as in normal use. That will be 24/7/365. The longer we run the more results we have. Furthermore we are running idle agents that increase our Bench Statistics :wink:

Will let you know if I have problems with the implementation and close the ticket.