Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

How to get the test case status from a baseline in test set

$
0
0

Hi,

I have a script that when a user wants to execute a test instance ,it checkes the status of a test case in test plan and notifies the user in case the test status  is not approved.

it work well, however we are usually using baselines and the test set is pinned to a baseline, my script checks the test current status in test plan but I want to check the status from the exact baseline version of the test according to the pinnend test set baseline.

Is this even possible?

If so , any help of how the below script needs to be changed would be great.

Function TestLab_ActionCanExecute(ActionName)

Dim answer
set td= TDConnection
set testf = td.testfactory
dim test_id_plan
dim status_Test

On Error Resume Next
Select Case ActionName
case "act_run", "act_run_manually", "act_continue_man_run", "act_run_test_set", "ContinueManRunAct"
test_id_plan= TestSetTest_Fields("TC_TEST_ID").Value
MsgBox test_id_plan
set testA = testf.item(test_id_plan)
status_Test = testA.field("TS_STATUS")
MsgBox status_Test
If status_Test <> "Approved" then
answer = MsgBox("The Test is not Approved yet! do you want to Continue?", vbYesNo)
If answer = vbNo Then
TestLab_ActionCanExecute = False
END IF
End If
'MsgBox "The test is not approved yet, do you want to continue""

End Select
On Error GoTo 0
End Function

 


Viewing all articles
Browse latest Browse all 5491

Trending Articles