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

Why is uiscripts.context.suite undefined while editing an existing suite?


I am adding some additional functionality to the suite edit page. This is the edit page for an already existing Test Suite, not the “Add Test Suite” page. So, I would think that the context of uiscripts.context.suite would exist. But, I only see project and user as being available.

Why is this the case?


Hi Zach,

The UI Script script context is only fully populated on the view pages, not the edit forms currently. If you are just interested in the suite ID, you can also extract the ID from the current request URL. Additional details can be loaded with TestRail’s API:

(note the required change on how to get the suite ID)