To ensure that your contribution doesn't break any logic, we would like you to run the test scenario's within the iaf-test module before committing your changes. To do this, you'll have to download a handful of JARs and adjust your Tomcat server configuration.
This guide was written with the assertion that you are A) using Eclipse, and B) have successfully ran the iaf-example module before. If this is not the case, please follow the steps as described on our CONTRIBUTING page.
Download the following JAR files. We advice you to place them in the Servers\lib folder of your Eclipse workspace. If you don't have this folder, you can create it.
- geronimo-j2ee-management_1.1_spec-1.0.1.jar
- geronimo-jms_1.1_spec-1.1.1.jar
- geronimo-jta_1.1_spec-1.1.1.jar
If you want to use Queuing or a DBMS other that H2, you need to add their corresponding JDBC drivers:
- For MariaDB or MySQL: mysql-connector-java-8.0.20.jar (N.B. for proper XA support, the MySQL driver is used for MariaDB DBMS too)
- For MSSQL : mssql-jdbc-7.2.2.jre8.jar
- For Oracle : ojdbc8.jar
- For PostgreSQL : postgresql-42.2.14
- For ActiveMQ : activemq-all-5.8.0.jar
Versions are subject to change, please check our pom.xml for the current driver(s) and their corresponding versions.
In Tomcat's launch configuration (go to the Java EE perspective to access your Tomcat server, find launch configuration in the Tomcat Overview window), go to the Classpath tab. Click on the User Entries item and click on the [ Add JARs... ] button. Select all JARs in the lib folder, press OK, and press OK again.
The module's test scenarios can be run manually with the Larva testtool. This will be done within an iaf-test instance running on your Tomcat server. To make this possible...
-
In the Project Explorer, go to your Tomcat's catalina.properties file. At the bottom, add the lines:
log.dir=c:/temp
(lower case 'c' is mandatory)dtap.stage=LOC
.credentialFactory.class=nl.nn.credentialprovider.PropertyFileCredentialFactory
authAliases.expansion.allowed=testalias
-
In the Tomcat Overview window, set the port number for HTTP/1.1 to 80. If you wish to use another port, please set the property
web.port
accordingly in catalina.properties. -
In the same window, go to the Modules tab at the bottom and add "/iaf-test" as a web module.
-
In the Project Explorer, right-click the iaf-test module and select Properties. Go to Deployment Assembly, press [ Add... ]. Select Folder, press [ Next ]. Select the src/main/configurations folder, and press Finish. In the text field right of your new src/main/configurations item, enter
WEB-INF/classes/configurations
. (might not be necessary anymore) -
Do the same for the src/test/testtool folder. For that, enter
testtool
as deploy path. (might not be necessary anymore)
The ibis-adapterframeworkt-test project supports multiple databases. By default an H2 local database is used.
Docker projects for a number of other DMBSes are provided in iaf/docker/dbms. To use one of the provided databases, run the rebuild.bat
script in the corresponding directory. (requires Docker to be installed on your machine). To configure the ibis-adapterframeworkt-test application, set in the catalina.properties the property jdbc.dbms.default
to oracle
, mssql
, mysql
, mariadb
or postgres
.
Run your Tomcat server from Eclipse's Servers view. It may take up to a minute for Eclipse to launch it; once ready, you can find the Ibis console by browsing to http://localhost/iaf-test/.
Once the Ibis console is loaded, go to the Larva testtool. Specify which scenarios to run and under which conditions - the default settings should be good for checking if everything works.
Press [ Start ], sit back, relax, do some stretches, and let's hope for the best. :)
- Some parts of the iaf-test module rely on proprietary modules. To tell Maven that it should download these modules, go to Window > Preferences > Maven > User Settings. If you already have a settings.xml file, press the "Open file" link. Otherwise, browse to C:/Users/(your name)/.m2/ and create a settings.xml file. Edit the file by adding your own repository or the frankframework nexus repository as mirror.
- When your IP-address is dynamically generated, you may have problems connecting to your database that runs in a docker image. The Larva tests reference the database host by a DNS name,
host.docker.internal
. Docker may not automatically update the IP address to which this name refers when your computer is assigned a new IP address. To see whether you have this issue, doping host.docker.internal
in a command prompt. If you cannot reach this address, refresh your docker network. You can do that using docker desktop. Press the settings icon (cogwheel) to the top. In the left-hand menu, choose Resources | Network. Update the docker subnet. - If you are using an Oracle database, mind the version of the driver you download. For each combination of a JDK version and an Oracle database version, the driver is different. The filename on the Oracle download page depends only on the JDK version though. You can find the Oracle version we use in
ibis-adapterframework-docker/pom.xml
.