Arquillian Container Test API 1.0.0.Final

org.jboss.arquillian.container.test.api
Interface Deployer


public interface Deployer

The Deployer interface describes how to deploy manually controlled Deployment's during test execution.

By default Deployment's are managed by Arquillian, which mean Arquillian will perform the deploy and undeploy operations for you automatically in the background. In some cases you might want a more fine grained control over the deployment lifecycle. e.g. You might need to test some kind of auto discovery feature of your application that happens during startup? In this case you can define a Deployment to not be Deployment.managed() = false and use the Deployer to manually deploy and undeploy them at your own will.

Usage Example:


 @Deployment(name = "X", managed = false)
 public static WebArchive create() {
      return ShrinkWrap.create(WebArchive.class);
 }

 @ArquillianResource
 private Deployer deployer;

 @Test
 public void shouldDeployX() {
      deployer.deploy("X");
 }
 

Version:
$Revision: $
Author:
Aslak Knutsen

Method Summary
 void deploy(String name)
          Deploy the named deployment.
 InputStream getDeployment(String name)
          Get the Deployment byte content.
 void undeploy(String name)
          UnDeploy a named deployment.
 

Method Detail

deploy

void deploy(String name)
Deploy the named deployment.
The operation will block until deploy is complete.

Parameters:
name - The name of the deployment

getDeployment

InputStream getDeployment(String name)
Get the Deployment byte content.

Parameters:
name - The name of the Deployment as defined by Deployment
Returns:
a Zipped Stream of the Archive

undeploy

void undeploy(String name)
UnDeploy a named deployment.
The operation will block until deploy is complete.

Parameters:
name - The name of the deployment

Arquillian Container Test API 1.0.0.Final

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.