I didn't find a solution in the documentation yet but I think there should be one…
I have a TestCatalog with some TestCases and one or more TestPlans. When I delete the TestCatalog and go to the "Test Stats"-Section, all my TestPlan are still listed. How can i delete those afterwards?
well, I think this is a bug in the testmanager plugin.
I think the only way is to go hard on the database and clean things up.
You can use the SQLExecutor plugin, shipped with the Test Manager, and clean things as follows. I suggest to use the latest SQLExecutor (from the 1.4.10 test manager release).
- backup you db. If you use SQLite (the default), just backup the trac.db file in the "yourenvironment/db" directory.
- testplan table:
- Identify the test plans you wish to delete looking at the plan names, using "select * from testplan"
- Note down the IDs you wish to delete, then: "delete from testplan where id in (1, 2, 3, …)", where 1, 2, etc are the IDs you wish to delete.
- testcaseinplan table:
- Remove the status of the test cases for the plans you have removed (don't worry, this does not affect the test cases themselves) by "delete from testcaseinplan where planid in (1, 2, 3, …)" same plan IDs as before.
- Same thing for testcasehistory. "delete from testcasehistory where planid in (1, 2, 3, …)" same plan IDs as before.
Please, could you open a ticket for this bug on trac-hacks?
Let me know how it goes.
when i was playing with the plugin i found a workaround on this problem:
1. create a new Testplan and open it
2. open a testcase in the new created testplan
3. now, in the addressbar change the value of planid to another one. e.g. planid=2
4a. if the testplan with id = 2 doesn't exist, you'll get an error.
4b. if the testplan exists, click on "Back to the Test Plan" in the top of the page
5. on this page there is an information which says: "The page TC_…. does not exist. You can create it here.". In top of this page click on "Back to the Catalog"
6. now, scroll down to the option: "Available Test Plans". There should be at least the one Testplan which you want to delete.
7. Delete the Plan
In my case, it works fine. It is a dirty workaround, but I think it is easier then doing it the hard way as you suggested.
You're hacking my hack!!!! ;-)
Yes, that will work. Anyway, I'll try to fix the whole thing asap (maybe this w/e I'll find some time).
The fix should be that while deleting a test catalog, all the associated test plans should be also deleted.
Thanks for your suggestion :D
Fixed with release 1.4.11.
The data referential integrity in case of test catalog, test case and test plan deletion has been enhanced.
Deleting a test catalog now also deletes all of the contained sub-catalogs, test cases and test plans, as well as the corresponding status change history.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.