/
Testing of the JBoss/Wildfly deployment

Testing of the JBoss/Wildfly deployment

The purpose of this page is explain how to test the TASKANA web application on a Wildfly Application server.

Integration Tests

There are dedicated integration tests for the TASKANA application on Wildfly. They can be found here: https://github.com/Taskana/taskana/tree/master/rest/taskana-rest-spring-example-wildfly/src/test/java/pro/taskana

These tests are based on a Wildfly server managed by Arquillian. 

The default runs an integration test with a H2 datasource. You can change this to PostgreSQL by providing an environment variable to the test:

-Ddb-type=postgres

This will use the application-<db-type>.properties instead. 


Maven Build

The Maven build will download the Wildfly server and unpack it into the target directory:

                    <execution>
                        <id>unpack-wildfly</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wildfly</groupId>
                                    <artifactId>wildfly-dist</artifactId>
                                    <version>${version.wildfly}</version>
                                    <type>zip</type>
                                    <overWrite>false</overWrite>
                                    <outputDirectory>${project.build.directory}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>

Furthermore the PostgreSQL database driver will be registered:

                    <execution>
                        <id>copy-postgres-db-driver</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <outputDirectory>${project.build.directory}/wildfly-${version.wildfly}/modules/system/layers/base/org/postgresql/main</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
[...]
                    <execution>
                        <id>copy-module-xml</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/wildfly-${version.wildfly}/modules/system/layers/base/org/postgresql/main</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>src/test/resources</directory>
                                    <includes>
                                        <include>module.xml</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>



Related content

TODO - Wildfly Application Server configuration
TODO - Wildfly Application Server configuration
More like this
Test User Structure
Test User Structure
Read with this
Seen errors in the build and their resolution
Seen errors in the build and their resolution
More like this
Preliminary: Use PostgreSQL as a Datasource for Camunda BPM
Preliminary: Use PostgreSQL as a Datasource for Camunda BPM
More like this
Deploy the TASKANA Outbox-REST application
Deploy the TASKANA Outbox-REST application
More like this
Installation on Wildfly 11
Installation on Wildfly 11
More like this