Skip to content
This repository has been archived by the owner on Jan 11, 2022. It is now read-only.

WTES-29: JUnit 5 extension for AemContext #5

Merged
merged 1 commit into from
Aug 13, 2018
Merged

WTES-29: JUnit 5 extension for AemContext #5

merged 1 commit into from
Aug 13, 2018

Conversation

karollewandowski
Copy link
Contributor

This is some kind of draft for feature described here: https://wcm-io.atlassian.net/browse/WTES-29.
Few words about how it works:
If test lifecycle method (@BeforeEach, @Test, @AfterEach) has AemContext parameter, then it will be created if not exists, or taken from context store. Parameter can be of AemContext abstract type - default context which is ResourceResolverMockAemContext will be created in such case. All 3 lifecycle methods must have matching context parameter. In case we inject JcrOakAemContext in @BeforeEach and JcrMockAemContext in @Test, then exception will be thrown with hint for developer what is wrong (it could be improved to print it in more readable and easier to understand way).

@jenslauterbach
Copy link

Any updates on this? We would like to us JUnit 5 and aem-mock in our current project.

So we would very much like to see official JUnit 5 support.

@stefanseifert
Copy link
Member

we will definitely support it - active development paused for some time because the other junit5-related tooling was quite flaky at beginning of the year (e.g. in mockito, maven/surefire) - but there was some progress on this side. i plan to take up work on it soon.
the main discussion/work ticket is https://wcm-io.atlassian.net/browse/WTES-29.

@stefanseifert stefanseifert merged commit 04e8dbb into wcm-io:develop Aug 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
3 participants