Quality Center Workflow – Restrict Adding to Test Set if Test Checked Out
Question ID: 106523
3
0

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?

Marked as spam
Posted by (Questions: 3, Answers: 168)
Asked on November 20, 2015 6:31 pm
126 views
Answers (3)
3
Private answer

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

Marked as spam
Posted by (Questions: 3, Answers: 168)
Answered on November 20, 2015 6:43 pm
2
Private answer

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

Marked as spam
Posted by (Questions: 33, Answers: 21)
Answered on December 9, 2015 7:28 am
1
Private answer

Hi

the above work flow code is not working and it is restricting all both checked-out and checked in when we try to move folder of test scripts. please help us on this
it is working when we move test script individually to the test set but it is not working when we try to move folder of test scripts and it is restrcting all. can you please help us on this..

thank you..

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on June 12, 2017 5:51 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top