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

Using user variable in UI Script



I’m trying to create a UI script that creates a button that when clicked will run the trigger.php script on my web server while passing in a user variable (from the My Settings -> Settings tab).

Is there a way to do this? And more specifically, could it be done with a password user variable? I see in gurock’s online documentation that user variables can be accessed when developing custom defect plugins, e.g. $context[‘user’]->settings[‘jira_user’]
but I am not sure how, or if it’s possible, to do the same thing in a UI script.



Hello Alex,

Thanks for your posting! User variables or passwords are not exposed to the UI or UI scripts and it wouldn’t be possible to use those from UI scripts. For authentication purposes for the trigger script, we would recommend using something else than user variables or passwords from TestRail (maybe API keys or signed/secure tokens). Would this work for you?