We’re using the extended mini api to create a new test plan and mass add about a 150 test suites to it. Using this call:
curl -d "name=TestPlanA" -d "milestone_id=2" -d "suite_ids=1,2,3,4,5,6,7,8,9,10,..." "http://<URL>/index.php?/miniapi/add_plan/1&key=<KEY>"
It completes successfully and I can confirm it in the UI if I open “TestPlanA” and verify the 150 runs in it.
However, if one edits the test plan, makes changes (or not) and then clicks the “Save Test Plan”, a popup box informs the user that ALL the test runs are being deleted and re-added. Click Ok. Notice that all the test runs within this test plan have been deleted and recreated (you can see the id has changed).
If by chance, some of those runs have had test results reported against them, they’re deleted as well.
It seems that only the first edit/save action triggers this behavior, pointing to the mini api being the culprit. Somehow, the way it inserts test plans into the DB differs from they way the GUI does it.
A workaround for us, is to create the test plan, do a no-op edit/save, watch it harmlessly delete/recreate the test runs. Once this first action is done, further edit/save operations seem fine.
Could you confirm if this is a bug in the mini extended api ?
We’re using mini api version 1.4 with TestRail 184.108.40.2066.