The execute command has special behaviour when placed on
a <table> element. Instead of executing once, it
executes every detail row in the table and transfers the commands
from the header row to each detail row.
<table concordion:execute="#username = generateUsername(#fullName)">
<tr>
<th concordion:set="#fullName">Full Name</th>
<th concordion:assertEquals="#username">Username</th>
</tr>
<tr>
<td>Fred Bloggs</td>
<td>fredbloggs</td>
</tr>
<tr>
<td>John Doe</td>
<td>johndoe</td>
</tr>
<tr>
<td>Winston Churchill</td>
<td>winston</td>
</tr>
</table>
If the method generateUsername() returns the
full name in lowercase with spaces removed, when we run
the test we expect:
2 successes and
1 failure and
0 exceptions
to be reported.
The failure will have an expected value of
"winston"
and an actual value of
"winstonchurchill".