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

Notification for all changes in testrail


#1

Hi,

My team is building an internal solution which includes integrating with our Testrail instance and staying in sync with it. Using the email notification feature, we are able to keep the test results in sync but can’t find any API / feature that will help us stay in sync with other changes. Such changes might include “test run deleted and recreated”, “test case updated”, “test plan added” etc…

For the last case (test plan added), we can make use of the get_plans api but have to setup a scheduled task to scan our testrail instance and poll for changes. It would be much better if there was a way to subscribe for change notifications, in addition to the email updates for new test results.

Is there any way to achieve this?

Thanks!


#2

Hi @amaharana,

Thanks for your posting. There are no built-in notifications for all events currently but this is already on list of things to look into. Can you share a few more details on what you are trying to accomplish? Do you require a full sync or would be possible to query the latest data on demand instead?

Cheers,
Tobias


#3

Hi @tgurock,

I am building a dashboard to allow users to view Test Rail data in different ways. Some of the use cases are:

  1. One-time full sync at the start (get_plans API is sufficient for this)
  2. On-demand data test results (existing APIs such as get_test etc. meet this need)
  3. Update project database when a new plan or run is added => I need a way for the dashboard to be notified that a new plan has been added so the database can be updated. The only notification I found is the email notification when a test result is added, but there is no way to get notified of other changes in TestRail.

#4

Hi @amaharana,

Thanks for the additional details. The last point can also be implemented by periodically querying the API. Although not ideal (and the frequency of API requests should be low, otherwise you are rate-limited), you can use the created_after filter with get_plans or get_runs. This will only return that were added after the given date/time, so the result would only include new plans/runs. You would only need to keep track of the last time you asked the API.

Cheers,
Tobias


#5

Right, that’s what I am using now but that entails maintaining an additional scheduled job and there is also the rate-limiting issue to contend with. Hence it would be great if there was some way to get notified of changes.


#6

Yes, it’s planned to look into this and one option we are looking at is to use web hooks for such kind of notifications (in addition or instead of email notifications). Thanks again for your feedback on this, that’s appreciated!

Cheers,
Tobias


#7

Thanks for the update. We are processing the email notifications only because it’s the available option right now. An API based notification hook will be much better.

Cheers!


#8

Happy to look into this for a future version!

Cheers,
Tobias