com.mycila.testing.plugins.jetty
Annotation Type JettyRunWar


@Target(value={TYPE,METHOD})
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface JettyRunWar

This annotation enables the loading of a packaged web application (ie: a WAR file) by a Servlet Container when used with junit runner org.junit.runner.RunWith and MycilaJunitRunner. This is useful to run functional and integration tests (its).

Here's an example which run webapp accessible by default at URL : http://localhost:9090/its

 @RunWith(MycilaJunitRunner.class)
 @JettyRunWar
 public class ExampleTest {
 
     @Test
      public void testSomething() {
          ...
          // you can use JettyRunWarHelper to automatically retrieve the webapp based URL
          String basedUrl = WebappHelper.getWebappUrl(this);
          Assert.assertEquals("http://localhost:9090/its", basedUrl);
      }
 }
 //
 

Author:
amertum
See Also:
WebappHelper

Optional Element Summary
 Class<? extends RawConfig> value
          Returns the RawConfig class which defines how to deploy the webapp
 

value

public abstract Class<? extends RawConfig> value
Returns the RawConfig class which defines how to deploy the webapp

Returns:
the RawConfig class which defines how to deploy the webapp, default DefaultConfig .
See Also:
DefaultConfig, RawConfig
Default:
com.mycila.testing.plugins.jetty.config.DefaultConfig.class


Copyright © 2010-2011 Mycila. All Rights Reserved.