Since: Concordion 4.0.0
An active specification with JUnit 5 Jupiter consists of two parts: a specification (eg. in HTML, Markdown or Excel) and a Java fixture annotated with @ConcordionFixture
.
The only other difference from JUnit 4 (and JUnit 5 Vintage) is that the JUnit annotations are no longer supported with JUnit 5 Jupiter.
The fixture class must be in the same package as the specification. The fixture class must have the same name as the specification (excluding the file extension), and can optionally have Test
or Fixture
appended.
When you run the fixture class using JUnit, it will automatically locate the specification file. It does this by looking in the same package for the specification file named the same as the test, but without the Test
or Fixture
suffixes.
If your test is called com.example.BreadcrumbTest
then the corresponding specification file must be in the same package (com.example
) and called Breadcrumb.html
. (Other specification types will use different suffices, eg. .md
or .markdown
for Markdown specifications.)
When using the run command, the fixture class is located from the referenced specification by looking in the same package as the specification for a JUnit test named the same as the specification with optionally Test
or Fixture
appended.
If your specification contains a run command referencing the specification Breadcrumb.md
in the com.example
package, Concordion will look in the following order for a corresponding fixture:
com.example.Breadcrumb
com.example.BreadcrumbTest
com.example.BreadcrumbFixture
Are not supported with JUnit 5 Jupiter.
Instead the Concordion annotations are available and will work with all supported versions of JUnit.
import org.concordion.api.ConcordionFixture;
@ConcordionFixture
public class JUnit5Test {
// ...
}