@Retention(value=RUNTIME) @Target(value=TYPE) @Inherited public @interface ArtifactClassLoaderRunnerConfig
ArtifactClassLoaderRunner in order to run the tests in the module.
Be aware that this annotation will be loaded for the whole module being tested, it is not supported to have different annotated
values for different test classes due to in order to improve the performance a ClassLoader is created only the first
time and used to run several tests.
A best practice is to have a base abstract class for your module tests that extends
org.mule.functional.junit4.ArtifactFunctionalTestCase or
org.mule.functional.junit4.MuleArtifactFunctionalTestCase for mule internal tests, to define the isolation runner
configuration using this annotation that applies to all the tests that are being executed for the same module.
The concept of module of execution is being backed by a JVM where a JVM is created for running the whole test of the module, in
case of maven either IDEs.| Modifier and Type | Optional Element and Description |
|---|---|
Class[] |
exportPluginClasses
|
String[] |
providedExclusions
Maven artifacts to be excluded from the
provided scope direct dependencies of the rootArtifact. |
String[] |
sharedRuntimeLibs
Runtime libraries in the format of
<groupId>:<artifactId> to be added as shared libraries to
ArtifactClassLoader. |
String[] |
testExclusions
Maven artifacts to be excluded from the
test scope direct dependencies of the rootArtifact. |
String[] |
testInclusions
Maven artifacts to be included from the
test scope direct dependencies of the rootArtifact. |
public abstract String[] providedExclusions
provided scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].
provided scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].public abstract String[] sharedRuntimeLibs
<groupId>:<artifactId> to be added as shared libraries to
ArtifactClassLoader. These artifacts have to be declared as test
scope dependencies for the rootArtifact.
Be aware that only the artifact would be added as shared libraries, it will not include its dependencies.String to define runtime libraries in order to be added as shared libraries.public abstract Class[] exportPluginClasses
String fully qualified Classes that the test would need to get access to and
they are not exposed by the plugin. Meaning that the isolation of plugins would be broken due to these Classes would
be exposed no matter if the plugin doesn't expose them.
Classes defined here will be also visible for all the tests in the module due to the ClassLoader is created
one per module when running tests.
Only Classes from the rootArtifact when it is a plugin would be exposed, it is not possible to export a Class
that belongs to other plugins rather than rootArtifact.Class for those classes that has to be exposed for the test. By default is empty.public abstract String[] testExclusions
test scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].test scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].public abstract String[] testInclusions
test scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].test scope direct dependencies of the rootArtifact. In format
[groupId]:[artifactId]:[extension]:[classifier]:[version].Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.