Professional Documents
Culture Documents
1. Add dependency 4. Chameleon annotation meta-annotation 6. Chameleon Maven build deployment 7. Chameleon Gradle build deployment
Add dependency in your build tool. You can use @ChameleonTarget as meta-annotation of your Add dependency: pom.xml
own annotations.
pom.xml pom.xml <dependency>
Wild y.java <groupId>org.arquillian.container</groupId>
<dependency> <dependency> <artifactId>
<groupId>org.arquillian.container</groupId> @Target({ ElementType.TYPE}) <groupId>org.arquillian.container</groupId> arquillianchameleongradlebuilddeployment
<artifactId> @Retention(RetentionPolicy.RUNTIME) <artifactId> </artifactId>
arquillianchameleonjunitcontainerstarter @Documented arquillianchameleonmavenbuilddeployment <version>1.0.0.CR4</version>
</artifactId> @Inherited </artifactId> <scope>test</scope>
<version>1.0.0.CR4</version> @ChameleonTarget("wildfly:12.0.0.Final:managed") <version>1.0.0.CR4</version> </dependency>
<scope>test</scope> public @interface Wildfly { <scope>test</scope>
</dependency> } </dependency>
You can execute Gradle build task and take the output and
deploy it to choosen container. @DeploymentParameters are
GreetingsServiceTest.java You can execute Maven package goal and take output and used to set same parameters as you usually do in @Deployment
2. Chameleon container deploy it to choosen container. @DeploymentParameters are annotation.
@Wildfly used to set same parameters as you usually do in @Deployment
You can de ne the container to be used in arquillian.xml @RunWith(ArquillianChameleon.class) annotation. GreetingsServiceTest.java
using Chameleon special container. public class GreetingServiceTest {
} GreetingsServiceTest.java @RunWith(ArquillianChameleon.class)
arquillian.xml @ChameleonTarget("wildfly:12.0.0.Final:managed")
@RunWith(ArquillianChameleon.class) @GradleBuild
<container qualifier="chameleon" default="true"> @ChameleonTarget("wildfly:13.0.0.Final:managed") public class GreetingServiceTest {
<configuration> @MavenBuild }
<property name="chameleonTarget"> 5. Rede ning meta-annotations @DeploymentParameters(testable = false)
wildfly:13.0.0.Final:managed public class GreetingServiceTest {
</property> You can use your own annotations as meta-annotations as well to }
</configuration> rede ne any of the parameters.
</container> 8. Supported Containers
Wild y13.java
Name Version
@Target({ ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME) JBoss EAP [6.x-7.x]
3. Chameleon annotation @Documented
@Inherited
You can use annotation approach by using @Wildfly Wild y [8.x-13.x]
ArquillianChameleon runner and annotating your test with @ChameleonTarget(version = "13.0.0")
@ChameleonTarget. public @interface Wildfly13 {
} JBoss AS [7.0 - 7.1]
GreetingsServiceTest.java
Tomcat 6.x-8.x]
You can use system properties and environment
Important
variables, i.e ${application.server}