View Source

h2. Situation
Send built artifacts to all Linux x86 32bit agents for testing. After test finishes, publish test reports on these agents to QuickBuild server.

h2. Demonstration
To demonstrate this, two agents are set up at the demo site, with below grid user attributes:
Our purpose is to run tests on all agents with this attribute. In our demonstration, agents matching this criteria are and
# Switch to the [test configuration|], and hit the run button.
# Change to [overview page of latest build|] after build finishes, and you will see two set of test reports are published, one is for agent, and another is for agent
# The [step status page of latest build|] also indicates that tests have been run on these two agents.

h2. Resolution
Switch to [steps page of the test configuration|]:
# The _checkout_ step pulls project source code out of SCM.
# The _compile_ step compiles the project to produce class files to be tested
# The _test on all applicable agents_ step is a parallel composition step, and it will run all contained steps concurrently. It will also repeat child steps in a concurrent way if child steps are configured with repeating params.
# The _test on agent_ step is a sequential composition step:
## This step is configured with a repeat param. The param name is set as _agent_, and param values is set as addresses of all build agents with attribute _arch_ equals to _linux-x86-32_.
## This step is set to run on grid node with address equals to param _agent_. This is done through property _node selection_.
## This step is configured to fetch necessary test files from parent node (the node running parent step) to current node (the selected agent) through the property _fetch input files_.
## The above settings effectively makes the _test on agent_ step running on all linux-x86-32 agents, and these agents will run this step concurrently since it is contained in a parallel composition step.
# The step _test on agent_ contains two child steps, respectively _run test_ and _publish test reports_. Since step _test on agent_ is set to run on all applicable agents, these two child steps will also run on those agents to do the actual work. Specifically, the _publish test reports_ step uses _$\{params.get("agent").replace(':', '-')\}_ as report set name to group test reports by agents (character ':' is replaced with '-' since this character is not allowed in report set name).