Although web browsers (and even the XHTML 1.0 Strict DTD) accept HTML tables without
explicit <thead>
and<tbody>
sections,
some people prefer to put them in. The verifyRows
command supports tables containing these sections.
Given the method getNames()
returns a Collection containing the names:
John, Paul
The following instrumentation:
<table concordion:verifyRows="#name : getNames()"> <thead> <tr> <th concordion:assertEquals="#name">Name</th> </tr> </thead> <tbody> <tr> <td>John</td> </tr> </tbody> </table>
Results in this output:
<table concordion:verifyRows="#name : getNames()" xmlns:concordion="http://www.concordion.org/2007/concordion"> <thead> <tr> <th concordion:assertEquals="#name">Name</th> </tr> </thead> <tbody> <tr> <td class="success">John</td> </tr> <tr class="surplus"> <td class="failure"> <del class="expected"> </del> <ins class="actual">Paul</ins> </td> </tr> </tbody> </table>
Notice how the surplus row is added into the tbody
section.