Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How do I execute remote tests via threads on two SilkTest Agents?

How do I execute remote tests via threads on two SilkTest Agents?

Thread 1 is to be executed on Agent A.
Thread 2 is to be executed on Agent B.

You can execute tests in parallel via threading. Attached is an example script demonstrating this procedure:

[-] List of string lsmachines = {...}
[ ] "ukbed-gshields3"
[ ] "ukbed-phenry2"
[ ]
[-] main()
[ ] MyParallelTest(lsmachines)
[ ]
[ ]
[-] multitestcase MyParallelTest (LIST of STRING lsMachines)
[ ] STRING sMachine
[ ] LIST of HMACHINE lhmHandles
[ ]
[ ] // Connect to all machines in parallel:
[-] for each sMachine in lsMachines
[ ]
[ ] // Set app state of each machine, invoking if necessary:
[ ] //SetMultiAppStates()
[ ]
[ ] ListAppend (lhmHandles, Connect (sMachine)) // the connect to the machines was missing
[ ]
[ ] // Run testcases in parallel
[-] for each sMachine in lsMachines
[-] spawn
[ ] SetMachine (sMachine)
[ ] // Call testcase(s) or call main()
[ ] Test125()
[ ] // you have to put the rendezvous statement outside of the for-loop, because otherwise
[ ] // SilkTest would wait in each run of the loop until the thread is finished
[ ] rendezvous
[ ]
[ ] // Run testcase only on the first machine
[ ] //SetMachine (lsMachines[1])
[ ] // Call testcase(s) or call main()
[ ] //Test125()
[ ]
[ ]
[ ]
[ ]
[-] testcase Test125 () appstate none
[-] recording
[ ] Print("****Inside Test ***")
[ ] TestApplication.SetActive ()
[ ] TestApplication.Control.CheckBox.Pick ()
[ ] sleep(2)


Old KB# 23437

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:35
Updated by:
 
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.