With ALM 11.52, if a user executes a test script in Test Lab while it is still 'Checked Out' then the Draft Run flag is automatically set to 'Y' and the execution result is not recorded. I am trying to implement some simple workflow that will stop a user adding a Checked Out Test Script to a Test Set. Can anyone offer some advice?
Answer by Jafar · Nov 20, 2015 at 06:43 PM
Here is an example using the TestSet_CanAddTests(Tests) Function:
Function TestSet_CanAddTests(Tests) 'On Error Resume Next Dim aTest, iTest, allowed allowed = True For iTest = LBound(Tests) To UBound(Tests) 'Get an OTA Test object from its ID Set aTest = TDConnection.TestFactory.Item (Tests(iTest)) 'See if it's checked out If aTest.Field("TS_VC_STATUS") = "Checked_Out" then 'Inform user it won't be added (but continue to get all checked out tests) MsgBox "Test: " & aTest.Name & " is not Checked In; Check In before " & _ "adding to the Test Set.", vbExclamation, " ALM Workflow Error" allowed = False End If Set aTest = Nothing Next ' iTest TestSet_CanAddTests = True On Error GoTo 0 End Function
Answer by sai · Dec 09, 2015 at 07:28 AM
Function TestSet_CanAddTests(Tests) 'On Error Resume Next for each testid in Tests msgbox testid set tfact = TDConnection.TestFactory set tfactItem = tfact.Item(testid) if tfactItem.VCS.IsCheckedOut then TestSet_CanAddTests = False msgbox "you can add only checked in test scripts as instances" else TestSet_CanAddTests = True end if next 'TestSet_CanAddTests = DefaultRes 'On Error GoTo 0 End Function
Restrict Drag and Drop in Test Plan 1 Answer
ALM Workflow audit 1 Answer