Home Corporate Contacts

TETware Knowledgebase


Products
Solutions

Information

Datasheet
Documentation
FAQ
Knowledgebase

Return to Knowledgebase Index

36. Running different randomly selected test cases in parallel on several systems

 

Question

The scenario we would like to setup takes a set of test cases, selects a random element within an outer repeat loop. This works fine locally. But when we wrap this scenario in a :remote: directive, what we get is the same test case being processed on all remote machines, rather than the whole scenario being executed on all remote machines.

I want to be able to have a different (randomly selected) test case executed on each remote node. The goal is to setup a stress test environment to simulate a lot of concurrent operations, not a lot of simultaneous identical operations.

 

Answer

The behaviour that you observe is correct. Each test case within the scope of a :remote: directive (which doesn't include system 0) is processed on each of the specified systems at the same time - effectively ``in parallel''.

If the :remote: directive encloses a :random: directive, the :random: directive selects a test case, then the :remote: directive processes the test case on each of the named systems.

The trick is to push the system attribute further up the scenario tree. For example, a scenario that looks something like this will do it:


all
	:parallel:^systems

systems ^sys1 ^sys2 ^sys3 ^sys4 ^sys5

sys1 :remote,1:^loop

sys2 :remote,2:^loop

sys3 :remote,3:^loop

sys4 :remote,4:^loop

sys5 :remote,5:^loop

loop :repeat,10;random:^tclist

tclist /ts/tc1/tc1 /ts/tc2/tc2 /ts/tc3/tc3 /ts/tc4/tc4 /ts/tc5/tc5 . . .



This scenario must be run in ETET compatibility mode. (that is: set TET_COMPAT=etet in the per-mode configuration(s)) The scenario relies on the way that tcc inserts implied sequential directives into the tree when processing a scenario in ETET mode.

 

See also

  • The description of the :parallel: directive in the TETware Programmers Guide.

 


Home Contacts Legal Copyright Corporate News

Copyright © The Open Group 1995-2012, All Rights Reserved