Concordion > Extension >

Resource Extension

Resources can be added to the Concordion output folder using an extension. This is useful if your extension requires resources, such as applying additional styling.

Since Concordion 2.0.0, you can also add resources using the ConcordionResources annotation. This is a simpler mechanism if your goal is just to add resources, without introducing additional functionality.

This specification describes the first case, how to add resources using an extension.

Static Resources

"Static" resources can be created in the Concordion output folder. These resources must be available prior to running the Concordion specification.

Example

An extension is installed that copies test/concordion/o.png from the classpath to /images/o.png.

When Concordion is run, the resource /images/o.png is available in the Concordion output directory.

Dynamic Resources

"Dynamic" resources can be written to the Concordion output folder during a Concordion run. These resources are typically created while running the Concordion specification, for example screenshots being generated by an assertEqualsListener.

Example

An extension is installed that creates the dynamic resource /resource/my.txt in the target.

When Concordion is run, the resource /resource/my.txt is available in the Concordion output directory.