@Inherited @Documented @Retention(value=RUNTIME) @Target(value={TYPE,METHOD}) public @interface RunAsClient
In some cases it is useful to run different test methods in a test class in different modes, e.g. a client method that calls a Servlet for then to verify some internal state in a in container method.
Usage Example:
@Deployment
public static WebArchive create() {
return ShrinkWrap.create(WebArchive.class);
}
@Test @RunAsClient
public void shouldExecuteOnClientSide() { ... }
@Test
public void shouldExecuteInContainer() { ... }
Copyright © 2017 JBoss by Red Hat. All rights reserved.