Is there a way to do multiple functions inside of a single UI script? My use case would be a situation where I am removing the Test Run button and renaming all of the places where Test Runs are referenced to our internal nomenclature. right now I have a whole bunch of individual scripts, but I would like to bundle all of these similar things into one script for ease of maintenance.
You can simply put them into a single UI script and then include all relevant pages in the
includes option. It’s important to note that the UI script should be fast, otherwise this would negatively affect the TestRail experience and this is especially important on complex pages such as the suite/case repository and run pages with potentially very large tables/lists of cases/tests.
Do you have an example of this that you could share? I have tried a multitude of different ways, and none of them seem to work.
I don’t have a concrete example but you can simply put your code into a single $(document).ready() block. You could either leave the
includes option empty (would target all pages then) or include multiple pages as follows:
includes: ^(runs/view)|(runs/overview)|(tests/view) ..
Would this work for you?