Highlighted
Trusted Contributor.
Trusted Contributor.
99 views

How to execute all the testsets in a test Folder under ALM

Jump to solution

Hi All,

In ALM, Test Lab, I Have a folder with multiple testsets and i wanted to run all these testsets which are in a particular folder via overnight batch.

I have a code but it is not working fine.

when i execute it picks the first testset and execute it fine but then it picks  2nd test set but did not run completely.

Could anyone please have a look.

set tdc = createobject("TDApiOle80.TDConnection")
tdc.InitConnectionEx "**************"
tdc.login "****", "****"
tdc.Connect "******", "*******"

Set objShell = CreateObject("WScript.Shell")
Set TSetFact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
Set tsFolder = tsTreeMgr.NodeByPath("Root\Archive")
Set tsList = tsFolder.FindTestSets("")

Set theTestSet = tsList.Item(1)
Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.Run

Set execStatus = Scheduler.ExecutionStatus

Do While RunFinished = False
execStatus.RefreshExecStatusInfo "all", True
RunFinished = execStatus.Finished
Set EventsList = execStatus.EventsList

For Each ExecEventInfoObj in EventsList
strNowEvent = ExecEventInfoObj.EventType
Next

Set TestExecStatusobj = execstatus.Item(1)
intTestid = TestExecStatusobj.TestInstance
Loop

Next

Set tdc = nothing

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: How to execute all the testsets in a test Folder under ALM

Jump to solution

Hi Aimon,

Thanks for reply.

I was also looking into the same and then finally able to run all the testsets which are in a folder.

Thank you again for looking into it.

View solution in original post

0 Likes
3 Replies
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: How to execute all the testsets in a test Folder under ALM

Jump to solution

Anyone help please.

Its urgent

Thank you

 

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: How to execute all the testsets in a test Folder under ALM

Jump to solution

hi, I took a quick look at your code and couldn't find where you "pick up the 2nd test set". Your code only run the 1st testset. See below the snippet in your code:

Set theTestSet = tsList.Item(1)
Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.Run

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

Re: How to execute all the testsets in a test Folder under ALM

Jump to solution

Hi Aimon,

Thanks for reply.

I was also looking into the same and then finally able to run all the testsets which are in a folder.

Thank you again for looking into it.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.