Test Cases moved to Recycle Bin folder instead of deleting

  • Questions
  • Test Cases moved to Recycle Bin folder instead of deleting
Question ID: 107518

I would like to get recommendation / solution to overcome handling deleted test cases. As of now, we are not able to retrieve any deleted test cases without restoring backup. We do not know who has deleted and when the entity was deleted. It will be helpful, if we have trashbin folder created and redirect all the deleted test cases to that folder. Please assist me with solutions and code for redirecting test cases.

Marked as spam
Posted by (Questions: 122, Answers: 3)
Asked on April 4, 2017 1:14 pm
Answers (1)
Private answer

If you wish to move the tests into a specifc folder instead of deleting, the below script shows an example of how this can be done in your Workflow Customization under the Test Plan - Test_CanDelete workflow trigger.

Function Test_CanDelete(Entity)
On Error Resume Next
Set TreeMgr = TDConnection.TreeManager
Set TreeNode = TreeMgr.NodeByPath(''Subject_Recycle Bin'')
Entity.Field(''TS_SUBJECT'') = TreeNode.NodeID
Set TreMgr = Nothing
Set TreeNode = Nothing

Test_CanDelete = False
On Error GoTo 0
End Function

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on April 4, 2017 1:15 pm