Concordion > Extension > Listeners >

Listeners for Executing Tables

When executing tables, Concordion notifies listeners of execute events for each row of the table. Execute listeners are notified that execution is complete prior to the assertions being evaluated.


An extension is installed that logs assertEquals and execute commands. When the following instrumentation:

<table concordion:execute="#username = generateUsername(#fullName)">
        <th concordion:set="#fullName">Full Name</th>
        <th concordion:assertEquals="#username">Username</th>
        <td>Fred Bloggs</td>
        <td>John Doe</td>
        <td>Winston Churchill</td>

is run with a method generateUsername() that returns the full name in lowercase with spaces removed, the logged events are:

Set #fullName = 'Fred Bloggs'
Execute 'Fred Bloggs, fredbloggs'
Success 'fredbloggs'
Set #fullName = 'John Doe'
Execute 'John Doe, johndoe'
Success 'johndoe'
Set #fullName = 'Winston Churchill'
Execute 'Winston Churchill, winston'
Failure expected:'winston' actual:'winstonchurchill'