Former HPE Products
cancel
Showing results for 
Search instead for 
Did you mean: 

How to Stop running whole testset when first test case is failed in ALM

 
Highlighted
Occasional Visitor

How to Stop running whole testset when first test case is failed in ALM

Hi,

We have lots of test cases in a test set and all the test case are depend upon the first test case.

If the first test case is failed then all other test case in test set should not execute.

All the test cases are VAPI-XP test cases and i am executing the test set via .vbs file which is scheduled by windows Task scheduler.

I have an idea that we can do it via execution flow in test set. but i wanted to do it in in my first VAPI-XP test case or via .vbs script.

 

the problem single test case is not executing. whole testset is exeuting.

Set objShell = CreateObject("WScript.Shell")
Set TSetFact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
Set tsFolder = tsTreeMgr.NodeByPath("**********************")
Set tsList = tsFolder.FindTestSets("123234")

For j = 1 To tsList.Count
Set theTestSet = tsList.Item(j)
Set TSTestFact = theTestSet.TSTestFactory
TSName = theTestSet.Name
Set TestSetTestsList = TSTestFact.NewList("")
For Each theTSTest In TestSetTestsList
TestName = theTSTest.Test.Name
TestID = theTSTest.Test.ID
TestStatus = theTSTest.Status

Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.Run (TestID)

if theTestSet.TestStatus = "Failed" then

Scheduler.stop

else

Scheduler.Run

end if

Next

Do While RunFinished = False

execstatus.RefreshExecStatusInfo "all", True
RunFinished = execstatus.Finished
Set EventsList = execstatus.EventsList

For Each ExecEventInfoObj In EventsList
strNowEvent = ExecEventInfoObj.EventType
Next

For i = 1 To execstatus.Count
Set TestExecStatusobj = execstatus.Item(i)
MsgBox TestExecStatusobj
intTestid = TestExecStatusobj.TestInstance
MsgBox intTestid
Next
Loop

Can some one please have a look and help me to sort out this issue.

Thank you in advance.

2 REPLIES 2
Highlighted
Community Manager

Re: How to Stop running whole testset when first test case is failed in ALM

Hi @pravkuma ,

ALM is part of a different company named " Micro Focus " . So you will need to repost your question to the Micro Focus Community at https://community.softwaregrp.com/ 


Thanks,
Parvez_AL
I work for HPE
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
CM_Cert_Logo_Color.png
Highlighted
Occasional Visitor

Re: How to Stop running whole testset when first test case is failed in ALM

Sorry and thanks for information.