Concordion > Commands >

verifyRows

When used on a <table>, the verifyRows command compares the contents of the table with the contents of a collection, and reports similarities, differences and missing or surplus rows.

The expression must return something Iterable (e.g. a Collection). By default, the contents of the table must be in the same order as the collection, but this can be overridden with different strategies for matching rows.

Example

<table concordion:verifyRows="#username : usernames"> 
    <tr>
        <th concordion:assertEquals="#username">Username</th> 
    </tr>
    <tr>
        <td>bpeep</td> 
    </tr>
    <tr>
        <td>jspratt</td> 
    </tr>
</table>
usernames Collection Results in Rows Marked As
bpeep, jspratt SUCCESS, SUCCESS
jspratt, bpeep FAILURE, FAILURE
hdumpty, jspratt FAILURE, SUCCESS
bpeep SUCCESS, MISSING
bpeep, jspratt, ppan SUCCESS, SUCCESS, SURPLUS
rhood, jspratt, ppan, mdaw FAILURE, SUCCESS, SURPLUS, SURPLUS

Further Details