serenity-core and serenity-model have dependencies to JUnit4, which has several implications.
At runtime JUnit4 is currently still needed.
serenity-core and serenity-model should be changed such that JUnit4 is an optional dependency.
Automatically taking screenshot for web tests
Screenshots are only taken if TestCaseAnnotations.isASerenityTestCase is true. Currently this method only works for JUnit4 tests as
it checks for the annotation @RunWith
Workaround: Tests can extend net.serenitybdd.junit5.AbstractSerenityTestDetectionWorkaround
From the readme...
TestCaseAnnotations.isASerenityTestCase
is true. Currently this method only works for JUnit4 tests as it checks for the annotation@RunWith
net.serenitybdd.junit5.AbstractSerenityTestDetectionWorkaround