JUnit Plugin - Commands


execute

What ?

Command to execute any Junit test using the JUnit5 framework.

EXECUTE execute WITH {<Res:script.junit5>} AS {<Res:result.junit5>} USING $({configuration})

> Input :

  • {<Res:script.junit5>} : The name (in the context) of the resource which references the java code bundle, including resources and compiled java classes (script.junit5 type resource).

  • {configuration} :

    • The qualified display name of the test to execute, using qualifiedClassName:<Specify name>,displayName:<Specify name>.
    • Or the unique Id of the test, provided by the JUnit engine, using uniqueId:<specify Id>.

Note 1 : These two possible configuration contents are mutually exclusive. Meaning that one has to choose how one wants to select the test to execute. Either using its qualified display name or using its unique Id, but not both.

Note 2 : If you use the qualified display name, make sure it is unique in the class being tested, or the execution will result in a failure.

> Output :

  • {<Res:result.junit5>} : The name (in the context) of the resource holding the result of the command (script.junit5 type resource).

Exemple with the qualified display name :

../../_images/junit-commands-test-class.png