Forum Discussion
Hi altemann and maximojo,
Sorry for the late reply I needed to work on other priorities. Thank you for your help, it help me to better understand how it works.
So if I've well understood, I need to run the Jobs with a script and not as an item in the master project. And the script is called by an item in the project. In itself it's not a problem. However if it allows to run 2 jobs on 2 slave computers, this doesn't allow to run some tests on the master computer in the same time than on a slave computer as it will wait for the end of a test item before starting the next one ?
Thanks for your help,
regards,
Christophe
Hi CBleunven
I will explain how I have the master and slaves run the same jobs at the same time so the master's time is not wasted (so to speak).
This is how I do it. I'm sure there are other ways to set this up.
Basically the Master function below called by TC/TE starts the entire distributed testing process. Of course this is probably best run on a remote VM through TestExecute as, with the master doing work, you couldn't do much on your local PC (unless perhaps it was not using the UI).
If this is too simplistic let me know what you would like to see and I'll try to whip something up.
// TestComplete/TestExecutetest item calls Master function // below which starts distributed testing function Master() { // run slaves which do some setup and call "AllWorkerLoop()" also. //Pass "false" so master does NOT wait for slaves to complete // but continues on once they are started NetworkSuite.Jobs.ItemByName("SlaveJobs").Run(false); // master goes into this loop which slaves are also running from // the line above AllWorkerLoop(); } // When the slaves startup they simply call the AllWorkerLoop() function function Slave() { AllWorkerLoop(); } // master and slaves call same function function AllWorkerLoop() { // do work here }
Related Content
- 4 years ago
Recent Discussions
- 2 days ago