Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Test case versioning



We are using Testrail and we would like to know if there is a way to have a version number that increments for test cases as we want to keep track of the different test case versions. Indeed, our test cases evolve as the software is changing and we would like to keep track of all this changes.



Hello Rebecca,

Thanks for your posting. TestRail automatically saves the history of your test cases and you can see the different changes of a test case via the History tab in the sidebar of the test case pages. TestRail doesn’t currently allow you to execute tests against old test case versions though. If you would like to execute tests against different branches, we recommend duplicating the relevant test suites.

I hope this helps.



Hi Dennis,

I have the same requirement, and attempted to do as you suggested. I created a new test suite and used the copy feature, selecting All test cases from one and including it in another “branch” suite.

While this did copy all test cases over, it seems to have lost its folder structure, creating a flat suite of individual folders, and not a folder hierarchy. Is there any way to maintain the hierarchy while doing this duplication?



Hello Chris,

Thanks for your posting. In the Copy & Move Test Cases dialog, there’s a checkbox in the bottom left corner named “Also copy/move sections”. Have you checked this? Only if you check this box would TestRail actually copy your section hierarchy.

I hope this helps.



Yes, that checkbox is selected. I just tried again with another suite, and found that it did copy 2 subdirectory relationships, but the rest were not copied. I could be wrong, but it looks to me that if a folder only includes other folders, and doesn’t actually have a test case directly within it, it doesn’t get copied along with folders that do contain test cases.

For example:

—C: Test case 1
—C: Test case 2
----E: Test case 3

When copied (with sections etc) would result in:

–C: Test case 1
–C: Test case 2
–E: Test case 3


Hello Chris,

Thanks for the additional details. Yes, your assumption is correct. The dialog is designed to copy/move test cases only and the section hierarchy is preserved only for non-empty sections. That said, I understand that this behavior should be optimized and we already have this on our feature request list. It’s also planned to introduce a direct test suite copy feature in a future version.