Package org.wildfly.testing.junit.annotation


package org.wildfly.testing.junit.annotation
Annotations for conditional test execution and resource injection in WildFly-based tests.

This package provides JUnit annotations that can be used with any testing framework to conditionally execute tests based on WildFly server configuration and inject server-related information.

Key Annotations

  • @RequiresModule - Skip tests when specific WildFly modules are not available
  • @AnyOf - Run tests if any of multiple module requirements are met
  • @JBossHome - Inject the WildFly installation directory path

Usage with WildFly JUnit Extension

These annotations work seamlessly with the wildfly-junit-extension module for full server lifecycle management:


 @WildFlyTest
 @RequiresModule("org.jboss.as.ejb3")
 public class EjbTest {
     // Test only runs if EJB module is available
 }
 

Usage with Other Frameworks

These annotations can also be used independently with Arquillian or other testing frameworks that manage the WildFly server lifecycle. Simply add the wildfly-junit-api dependency and the annotations will work as JUnit extensions.

Author:
James R. Perkins
See Also: