TestProject Forum

Post test results to an API


I am trying to do a simple webpage login / logout test, where I want to get the time used and passed/failed state of each step, and post the results to an API. It seems that the way to do this is to execute the test, then use the API add-on to get the results from the TestProject API, extract the parameters and post them to the API.
This raises a couple of questions I am unable to find a solution to:

  1. How to get the results for each of the passed steps in a test/job through the TestProject API?
  2. How to get the time used and the state of each step and post these values to the (external) API?

If there is a way to post the results for each step during the test (without polling the TestProject API), I would prefer that.

I hope my problem is clear and that there is a solution.
TestProject sees to be a very good tool and I would really love to use it for testing!


Hello @mike.lauritsen_testp
Can you please elaborate on your use case?
You can get the results of a Job/Test using these endpoints from the external API:

I am not sure on what you mean by

How to get the time used and the state of each step and post these values to the (external) API?

Hello @ran.tzur
I want to do some steps in a test, e.g. open a url, log in to a user account, check for a string and log out.
For each step in the test I want to measure the used time and get the result (passed/failed), and post the values (time and test result) to a monitoring system via its API (HTTP POST).
Today this is acheived via script, but I think TestProject would be a better solution if I were able to get the data from the reports and post it to the monitoring system API.
I would like for TestProject to post the results, rather than the external monitoring system polling TestProject API - but I can also do it the other way around if I have to. But I cannot see that the endpoints TestProject API v2 return details for passed steps (duration and result), only failed steps?