Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Configuring Profiles and Extensions

The ITest plugin supports the full range of Fabric3 extensions and profiles such as JTA, JMS, Web Services and REST. Profiles and extensions are enabled using the <profiles> and <extensions> elements respectively:

Code Block
xml
xml
  
<plugin>
   <plugin>
      <groupId>org.fabric3</groupId>
      <artifactId>fabric3-itest-plugin</artifactId>
      <version>${fabric3.version}</version>
      <configuration>
         <runtimeVersion>${fabric3.version}</runtimeVersion>
         <profiles>
             <profile>
                <groupId>org.fabric3</groupId>
                <artifactId>profile-jms</artifactId>
                <version>${fabric3.version}</version>
              </profile>
         </profiles>
         <extensions>
             <extension>
                <groupId>org.fabric3</groupId>
                <artifactId>some-extension</artifactId>
                <version>${fabric3.version}</version>
              </extension>
         </extensions>
      </configuration>
      <executions>
         <execution>
            <goals>
               <goal>test</goal>
            </goals>
         </execution>
      </executions>
   </plugin>
</plugins>

Specifying a System Configuration

The Maven runtime systemConfig is specified inline as part of the plugin <systemConfig> element in a CDATA section. It is the same format as the other Fabric3 runtime systemConfig.xml files:

Code Block
xml
xml
  
<plugin>
   <plugin>
      <groupId>org.codehaus.fabric3</groupId>
      <artifactId>fabric3-itest-plugin</artifactId>
      <version>${fabric3.version}</version>
      <configuration>
         <runtimeVersion>${fabric3.version}</runtimeVersion>
         <systemConfig>
            <![CDATA[
               <config>
                  <thread.pool size="100"/>
               </config>
             ]]>
         </systemConfig>
      </configuration>
    .....

   </plugin>
</plugins>

Multi-Module Tests

It is possible to configure the iTest plugin to test multiple contributions that are built from separate Maven modules. These modules may be part of the current project or contained in a separate project.

To deploy separate contributions to the iTest plugin, use the contributions element with nested dependency elements:

Code Block
xml
xml
<build>
   <plugins>
      <plugin>
         <groupId>org.fabric3</groupId>
         <artifactId>fabric3-itest-plugin</artifactId>
         <version>${fabric3.version}</version>
         <configuration>
            <contributions>
               <dependency>
                  <groupId>org.fabric3.tests</groupId>
                  <artifactId>test-multiple-application</artifactId>
                  <version>${project.version}</version>
               </dependency>
            </contributions>
         </configuration>
          .... 

      </plugin>
   </plugins>
</build>