How to configure test case name in sauce labs for robot framework

618 views Asked by At

I want to configure the name of the test case in Sauce Labs when viewing the test results. Currently the name that I am passing in the desired capabilities is popping up in the sauce labs and I am not able to understand which result is for which test case. So I want to see the test case name there so that I can easily identify the test results from the test case name. Can anyone please help in this matter.

The capability that I am passing now: Capabilities = "name:Win10+Chrome,platform:Windows 10,browserName:chrome,version:89.0"

I want to have the test case name in place of Win10+Chrome.

enter image description here

1

There are 1 answers

2
joshin4colours On

The name capability can be set to any string value. It looks like your capabilities do connect to Sauce Labs, so that's a good start. If you'd like to set the name capability to your Robot test suite, try this:

 Capabilities = "name:%{TEST_NAME},platform:Windows 10,browserName:chrome,version:89.0"

You can see a full example of how to run Robot Framework tests on Sauce Labs here: https://github.com/saucelabs-training/demo-python/blob/main/examples/robotframework/desktop_web/Tests/resource.robot