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

Automation integration: Adding additional Fields


#1

Hi all,

I’m a relative newbie to TestRail so apologies if I’m asking a stupid question but can you add HTML into UI scripts?

I’m currently tasked with integrating our automation scripts with TestRail so that our test team can trigger the automated test cases from inside TestRail. I’ve got the basic stuff working (We can trigger tests and see the results in TestRail) but i’m now trying to expand it to make it more flexible. I’d like to be able to select the browser and browser version the test is to be run on from inside TestRail.

I imagine this user flow:
The tester clicks the button, they then select the browser and version from some drop-downs and this is then sent to the trigger script. (I’ll be passing the browser and browser version as URL parameters to the trigger script).

Does that make sense?

Thanks,

Alex


#2

Hello Alex,

Thanks for your posting. Yes, it is supported to dynamically inject HTML via UI scripts and JavaScript. The trigger example does basically the same thing when its adds a button to the toolbar:

http://docs.gurock.com/testrail-custom/automation-trigger

That said, I would recommend looking into leveraging configurations and test plans instead of supporting a manual browser selection. You can learn more about configurations with the following training video:

http://www.gurock.com/testrail/videos/test-plans-configurations/

Using configurations to manage browsers would essentially create a separate test run for each browser which you can then automatically pass to your trigger script. The configuration of a test run is exposed as part of the UI script context (via the uiscripts.context.run.config).

I hope this helps!

Regards,
Tobias