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

Using Concurrent programming in Open Agent causes application to hang.

Using Concurrent programming in Open Agent causes application to hang.

Problem:-

Using the Concurrent programming testing feature in Silk Test Classic 14.0 with the open agent results in the application being tested hanging on the second machine. What can cause this issue?


Resolution:-

If TrueLog is enabled during the running of a parallel test, a hang or crash can occur. Further to this the rendezvous keyword will block executions of the calling thread until all threads that were spawned by the calling thread have completed.

It will be necessary to manually disable TrueLog prior to running a parallel test and to use the keyword 'rendezvous'.

To manually disable TrueLog from SilkTest Classic, navigate to Options - > TrueLog.   Simply uncheck the Enable TrueLog checkbox and click the ‘OK’ button.


The below is a sample script that connects to two separate remote machines to perform the same test on each machine:- 

[-] main()

                [ ] String sMachineName

                [ ] boolean bExists

                [ ]

                [ ] // Create a list of string that contains the host names of

                [ ] // each machine to run the test

                [ ]

                [-] LIST OF STRING lsMachines = {...}

                                [ ] "Machine1"

                                [ ] "Machine2"

 

                [ ] //Create a loop to run the test on each machine

                [-] for each sMachineName in lsMachines

                                [ ] //Use spawn keyword to create a new thread for the execution

     [ ] //of the following statement

                                [-] spawn

                                                [ ]

                                                [ ] //Connect to the specified machine

                                                [ ] Connect(sMachine)

                                       [ ] //Direct machine operations to the specified connected agent

                                       [ ] //defined above.

                                                [ ] SetMachine(sMachineName)

                                                [ ]

                                                [ ] PRINT(sMachineName + "ATTEMPTING CONNECTION")

                                                [ ]

                                                [ ] bExists = WebBrowser.BrowserWindow.Exists(2)

                                                [ ]

                                                [ ] WebBrowser.BrowserWindow.Q.TypeKeys("microfocus<#Enter>")

                                                [ ]

                                                [ ] //synchronise threads

                                                [ ] rendezvous

                                                [ ] //Disconnect from the connected machine

                                                [ ] Disconnect(sMachineName)

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-10-31 22:39
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.