PractiTest Discussion Forum

Is it possible to fetch the Steps specific to a certain Run of a Test Instance?


I’m looking to fetch the specific steps to a certain run of a test and can’t seem to find how to do this via the API. So for example, say I have the following:

A Test Set called Eat Breakfast
Which has a Test Instance called Get Refrigerated Ingredients
Which has three Steps:

  1. Open Fridge
  2. Get Milk
  3. Close Fridge

The data I need is essentially the timestamps each step was completed (and status too) for each run so I can calculate the duration that each step took.

In this example, I might run the Get Refrigerated Ingredients Test 5 times, and want to to calculate the total time between steps 1 and 3 to determine the total time the refrigerator was open for all 5 runs.

Is this possible via the API? Or does this level of granularity only exist at the Test Instance level?



Apologies for the late response. :disappointed:

Kindly note that you can perform this GET request to retrieve duration per run.


Thanks for the response Christine, and no worries about the delay. :slight_smile:

The runs API you linked only returns the duration for the entire run, not the duration each Step took for that instance of the run. As in my example above, I’m looking to retrieve the timestamp that a certain step within a run has changed state (e.g. when Pass, Fail, Block, N/A, or No Run was clicked), so that I can calculate the duration of each individual step.

I understand with how Test Runs function that this would be troublesome to calculate if the tester goes in and changes the state of a step after the fact, but in our use case, they will not be doing this.

So I suppose what I’m looking for is either an explicit run-steps API endpoint that will return all the steps for a specific run instance id (containing it’s current state and updated_at timestamp), OR a query param that you can add to the Run API endpoint you linked that returns the steps and their state/updated_at as part of the run instance resource.


Thanks for your detailed reply.

At this time we calculate running time per run, but per specific step within the run. Sorry…