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

Triggering a Report via the API


#1

Just wondering if it would be possible to trigger a TestRail report via an API?

It’d be pretty handy if we have an automated test run that, once finished, calls into TestRail to create a predefined report.


#2

Hi Glenn,

While there’s currently no option to trigger or create new reports via the API, this is already planned (especially for the use case you mentioned). I’ve just added another vote to this feature request, thanks for your feedback!

Cheers,
Tobias


#3

Hi Tobias,
Please put in an extra vote for me too!
Best,
Annemarie


#4

Added to the list, thanks Annemarie!

Cheers,
Tobias


#5

and an extra vote for me too :slight_smile:


#6

Thanks, added :smile:

Cheers,
Tobias


#7

you can add another vote - this would be great for our planned automated pipeline


#8

Added, thanks :smile:

Cheers,
Tobias


#9

I would also like this capability. We have several suites of tests that run against each build as part of our continuous integration testing. We were hoping to run a Jenkins job at the conclusion of that testing to summarize the testing in one place, and notify the team of the test results. Since we want to report the test results with the build (which happen frequently), having the ability to create the report using a script would make the reporting more timely. Glad this is in the pipeline! …and thanks @gmcdonald for being one step ahead of me! :slightly_smiling:


#10

Hi Bill,

Thanks for your feedback, I added another +1 to this feature request :slightly_smiling:

Cheers,
Tobias


#11

I would also like to be able to get report content in some machine-readable format using the API: is this planned as part of the aforementioned feature request?


#12

Hello Allan,

Thanks for your posting! There are currently no concrete plans for this but I’m happy to add this to our feature request list as well. Scheduling/triggering reports via API has a higher priority but I understand that getting the actual content of the reports in a structured format would be great as well and we will make sure to look into this.

Thanks again for the suggestion!

Cheers,
Tobias


#13

I’d like to be able to get a list of the top 5 failing test cases in each project, and expose the results link to each one (/cases/results/case_number) on a web page. I could see an api endpoint for generating a similar report if I give you an existing report id, then I could parse the page myself.


#14

Hello Matthew,

Thanks for your posting. The Cases > Status Tops report is exactly the report you are looking for. You can also auto-generate it via TestRail’s report scheduling features and we are also happy to look into full API support for the reports (just added another vote to this feature request, thanks!).

Cheers,
Tobias


#15

Hello All,

I too would like the ability to trigger reports via the API. It would tie together our automated framework nicely.

Cheers,
Erik


#16

Thanks for your feedback, Erik, happy to add your vote to the list!

Cheers,
Tobias


#17

hey Tobias,
me too, definitely +1 for this.
Automating the report creation at the end of a test run could be very useful!
(ps: as suggested by gmcdonald, it should be on ‘predefined’ mode then not imposing us the kind of report, but instead maybe calling a template to configure or sthg like this)


#18

Thanks for your feedback, Guillaume!

Cheers,
Tobias


#19

Hi,

Add a plus 1 for me too please. We are definitely looking at including the generation and sending of reports after an automated test run is complete. This feature would make it a lot easier for us.


#20

Thanks for your feedback, Luke!

Cheers,
Tobias