Package org.wildfly.testing.junit.extension.annotation
package org.wildfly.testing.junit.extension.annotation
Annotations for configuring WildFly server lifecycle and deployment management in JUnit tests.
This package contains the core annotations used to configure the WildFly JUnit Extension, which automatically manages WildFly server startup, shutdown, and deployment lifecycle during test execution.
Test Mode Annotations
@WildFlyTest- Enables the extension for standalone server mode@WildFlyDomainTest- Enables the extension for domain mode@ManualMode- Disables automatic server lifecycle management
Deployment Annotations
@DeploymentProducer- Marks a method that creates a deployment using ShrinkWrap@GenerateDeployment- Automatically generates a deployment from test class annotations@ServerGroup- Specifies target server groups for domain mode deployments@DomainServer- Qualifies resources for a specific domain server
Resource Injection Annotations
@ServerResource- Injects server resources likeURI,, or custom resourcesinvalid reference
org.wildfly.plugin.tools.ServerManager@RequestPath- Qualifies URI injection with a specific path
Example Usage
{
@code
@WildFlyTest
public class HelloWorldTest {
@DeploymentProducer
public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class)
.addClass(HelloServlet.class);
}- Author:
- James R. Perkins
- See Also:
-
ClassDescriptionUsed to identify a method as a method which creates a deployment.Qualifies the injection point for a
URIto indicate which server in a domain is being targeted.Used to identify a method as a method which creates a deployment.The supported deployment types.Indicates a test is a manual mode test.Qualifies aURIinjection point with a relative path that is appended to the deployment's base URI.Specifies the WildFly domain server group(s) to which a deployment should be deployed.Used to inject a resource as fields, constructor parameters or method parameters into tests.Indicates this test should run in WildFly domain mode.An annotation which starts a WildFly server and manages a server in standalone mode.