02-14-2019 06:57 AM
Hi All,
we'd like to log and display the results of a sequence call (subsequence) where we use New Thread as execution option.
There is a solution for this situation, but in my understanding this makes the New Thread option useless:
In this case we have to wait until the new thread is done, but this why we'd like to execute the subsequence in a new thread - we don't want to wait until it finish the execution.
Does anybody know a better solution?
Thx in advance!
MYki
02-20-2019 05:06 PM - edited 02-20-2019 05:19 PM
The idea behind that example is that you wait at the end of the calling sequence on the new thread, which still allows you to parallelize any steps that happen after the sequence called in a new thread. Here's an example:
Execution Profile with new thread:
Execution Profile without new thread:
This example decreases the total test time by about 20% by running "SubSequence" in its own thread while running "SubSequence_2" in the main thread.
If you'd like more detail on why exactly you need to wait at the end of the calling sequence to include the results from a new thread, I'd suggest reading through this white paper. The gist is that if the MainSequence finishes before the subsequence, the ResultList of the subsequence never makes its way into the ResultsList of the MainSequence, and never get processed by the plug-ins.
Edit: It actually would reduce the time in this case by about 50% if i preloaded my modules in both cases
Hope this helps!
Trent