Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.
 

Triggering Automated Tests specific to test suite name


#1

I’m trying to do add customized automated test triggers much like this example (http://docs.gurock.com/testrail-custom/automation-trigger) However, I would like it so the new button only appeared in certain tests, like if the tests was named ABC - Test 1, it would show, but not if it was XYZ Test 1. Is this possible?


#2

Hi,

Thanks for your posting. Yes, this would be possible and you can add a client-side filter to the UI script. The details of the current page (e.g. test run properties such as name) are exposed via the UI script context:

http://docs.gurock.com/testrail-custom/uiscripts-introduction#context_information

You can then simply add a filter/check to the trigger UI script (pseudo code):

if (uiscripts.context.run.name != 'ABC - Test 1')
{
    return;
}

I hope this helps!

Regards,
Tobias