Add a test run to a plan after creating it

Hello.

I’ve created a test run from a folder and would now like to add the run to a test plan. Would be great if there was a way to do this!

Thanks for your feedback. Currently, test runs are automatically linked to a test plan when being created from a plan. Otherwise, you cannot link runs to plans in the app, but it would be very convenient if that was possible. I’ve added it to our backlog.

In the meantime, you can use our API to update the test run and add the test plan id.

Here’s an example for curl. Specify your API key (replace <API_KEY_VALUE> with your API key*) and replace “:id” in the URL with the test run ID you want to update. Then set the value for “id” to the test run ID and the value of “testplan_id” to the plan ID that you want to connect.

curl -L -X PUT 'https://app.testiny.io/api/v1/testrun/:id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Api-Key: <API_KEY_VALUE>' \
--data-raw '{
  "id": 0,
  "testplan_id": 0
}'

* You can create API keys here in the settings.

There’s also a possibly easier alternative using the console in the Testiny app:

  • having the Testiny app open and being logged in
  • open the browser console (usually done by hitting the F12 key on your keyboard)
  • paste in following line where TR_ID is the ID of the test run (e.g. 123) and <TP_ID> is the ID of the test plan:
    await testiny.testrun.update({id: <TR_ID>, testplan_id: <TP_ID>}, true)

Best regards,
Alex