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!
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:
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
Hi, I am trying to do the same thing, but I end up with an API error. I copied the curl above. Here is the response I got: {"type":"ApiError","code":"API_INPUT_DATA_CONFLICT","message":"Conflict tag is enabled for this entity but missing in the input data.","reqid":"xIjN0KkO70fADFsCWyON"}
– Sean_McKee@Sean_McKee I actually received this useful command from someone in their support that you can run from the Dev Tools console of Chrome while logged in on any Testiny page (then you don't have to worry about authorization - you are running the command within a "preauthorized" environment): await testiny.testrun.update({id: TESTRUNID, testplan_id: TESTPLANID}, true); And then use the integer IDs as you would in the Curl. Worked perfectly and instantly for me! I think it may help solve your problem too as this is an internal update command, so you don't have to mess with API calls and keys
– David_Eisenberg@David_Eisenberg Thank you, that was incredibly helpful! Worked like a charm!
– Sean_McKee