Hi guys,
In regard to the post here: [Junit5] ProcessEngineRule compatibility with Junit5 - #8 by Ingo_Richtsmeier
Just to get your feedback on the following point:
In JUnit4, the DMN Engine dependency comes with a JUnit Rule, tests in JUnit4 use the DmnEngineRule
for bootstrapping the DMN engine, and then get the DMN engine with
@Rule
public DmnEngineRule dmnEngineRule = new DmnEngineRule();
@Test
public void test() {
DmnEngine dmnEngine = dmnEngineRule.getDmnEngine();
As demonstrated in Testing Decisions with the DMN Engine | docs.camunda.org
All in one single artifact: camunda-engine-dmn.
In JUnit5, the Rule is obsolete, as @Rule is replaced by @ExtendWith. The new annotation bootstraps the engine, same principle so far, then to get the DMN we have to ask the decisionService to evaluate the table as:
DmnDecisionTableResult tableResult = decisionService().evaluateDecisionTableByKey("tweetApproval", variables);
Here is the catch, the decision service is only available in the artifact: camunda-engine-7.X.jar, so one more artifact. . What if a project contains only the DMN artifact embedded, as mentioned here Embedding the DMN Engine | docs.camunda.org
Meaning, I have to include the whole process engine artifact in order to access the decision service in my tests, even if I do not want to access the other services.
Is there a way to test the DMN Engine with only the DMN engine artifact in JUnit5, as it was possible in JUnit4 ?
Any input is greatly appreciated.
Cheers