Test Case ID Counter Does Not Reset After Deleting the Most Recent Test Cases

Steps to Reproduce:

  1. Create 6 test cases in Testiny.
  2. Delete the last 3 test cases (TC-4, TC-5, TC-6).
  3. Create a new test case.

Expected Result:

The new test case should be assigned TC-4, since TC-4, TC-5, and TC-6 were deleted and no longer exist.


Actual Result:

The new test case is assigned TC-7, continuing from the last used ID instead of reusing deleted IDs.


Impact:

  • Test case IDs show an inflated count compared to the actual number of test cases.
  • Leads to confusion during test planning and tracking.
  • Affects traceability when referring to test case numbers during test execution and reporting.

Suggested Fix:

Reset the test case ID counter to the next available lowest number after the most recent deletions. For example, if the last test case deleted was TC-6, the next created test case should reuse TC-4 (the first available free ID in the sequence).

Hi and welcome to the Testiny forum!

Thank you for your feedback, it’s highly appreciated!
I understand the desire to have low and consecutive test case IDs, but unfortunately it is not that easy and currently not possible in Testiny:

  • Test cases (and also most other entities in Testiny) are only soft-deleted, meaning you can undelete them again. So if you delete a test case, it’s ID is still in use by the deleted (and possibly in the future restored) test case
  • Even if test cases would be completely deleted and thus the IDs would be free
    • if free slots would be reused, the IDs may be smaller, but the ID would in no way show which test case was created first → could also be confusing
    • if just using the next highest ID, you would again end up with empty slots and only in the edge case that the latest test case is deleted, it’s ID would be reused

So, in my opinion there is no perfect solution.
And since we allow un-deleting test cases, we don’t even have the choice to reuse IDs :slight_smile:

Best regards,
Alex

For reference, a similar question was asked before: