Concordion processing steps can be observed using the following listeners:
Concordion build listeners
provide access to the target
to allow resources to be writtenDocument parsing listeners
provide access to the document
prior to parsingSpecification processing listeners
provide access to the specification
before and after processingAn extension is installed that listens to assertEquals, assertTrue, assertFalse and execute commands. When the following instrumentation:
<p>The square root of <span concordion:set="#num">16.0</span> is <span concordion:assertEquals="sqrt(#num)">4.0</span></p>
is run with a fixture that performs the arithmetical operations, the logged events are:
Event |
---|
Concordion Built |
Before Parsing Document |
Before Processing [Resource: /testrig] |
Success '4.0' |
After Processing [Resource: /testrig] |
An extension is installed with a ConcordionBuildListener, DocumentParsingListener, SpecificationProcesssingListener, ExampleListener and AssertEqualsListener. When the following instrumentation:
<div concordion:example="before"> </div> <div concordion:example="example1"> <p>The square root of <span concordion:set="#num">16.0</span> is <span concordion:assertEquals="sqrt(#num)">4.0</span></p> </div> <div concordion:example="example2"> <p>The square root of <span concordion:set="#num">9.0</span> is <span concordion:assertEquals="sqrt(#num)">3.0</span></p> </div>
is run with a fixture that performs the arithmetical operations, the logged events are:
Event |
---|
Concordion Built |
Before Parsing Document |
Before Processing [Resource: /testrig] |
Before example 'example1' |
Success '4.0' |
After example 'example1' |
Before example 'example2' |
Success '3.0' |
After example 'example2' |
After Processing [Resource: /testrig] |
An extension is installed with a ConcordionBuildListener, DocumentParsingListener, SpecificationProcesssingListener, ExampleListener and AssertEqualsListener. When the following instrumentation:
<div concordion:example="before"> </div> <div concordion:example="example1"> <p>The square root of <span concordion:set="#num">16.0</span> is <span concordion:assertEquals="sqrt(#num)">4.0</span></p> </div> <p>The square root of <span concordion:set="#num">9.0</span> is <span concordion:assertEquals="sqrt(#num)">3.0</span></p>
is run with a fixture that performs the arithmetical operations, the logged events are:
Event |
---|
Concordion Built |
Before Parsing Document |
Before Processing [Resource: /testrig] |
Success '3.0' |
Before example 'example1' |
Success '4.0' |
After example 'example1' |
After Processing [Resource: /testrig] |