Additional tests that are server-oriented to add to those in Smack's Integration Test Framework.
These tests require Java 11 or later to execute.
The tests from this project can be executed using any of the following methods.
This project releases artifacts that are self-contained, executable JAR files. The file name format of these files is:
smack-sint-server-extensions-<version>-jar-with-dependencies.jar
When executing the JAR file, the tests are run.
To configure the tests, the framework properties can be provided as standard Java system properties.
For example, to run all tests except for those that relate to the XEP-0045 "Multi-User Chat" specification against a service named example.org, using an admin account to create test users, with security disabled, this command can be invoked:
java -Dsinttest.adminAccountUsername=admin \
-Dsinttest.adminAccountPassword=admin \
-Dsinttest.securityMode=disabled \
-Dsinttest.disabledSpecifications=XEP-0045 \
smack-sint-server-extensions-1.0.0-jar-with-dependencies.jarThis example demonstrates one possible way to provision accounts. Other configuration methods are also available, and you can explore the full set of options on our website.
This is an example Run/Debug configuration (which you can use in Intellij):
- Main class:
org.igniterealtime.smack.inttest.SmackIntegrationTestFramework - VM options:
-Dsinttest.service=example.org -Dsinttest.adminAccountUsername=admin -Dsinttest.adminAccountPassword=admin -Dsinttest.securityMode=disabled -Dsinttest.enabledTests=PubSubIntegrationTest
Running a configuration like this will make the PubSubIntegrationTest tests run against an XMPP server running on the XMPP domain 'example.org', using an administrator account that has as username/password: admin/admin.
This is the most basic configuration that you can use to run tests against a locally installed Openfire server that is running in 'demoboot' mode.
To run the tests directly from the source code, edit the pom.xml to match your settings, then run mvn exec:java
If you're using a published container from the registry, you can run the tests using the following command:
docker run \
--network=host \
-v "$(pwd)"/logs:/logs \
ghcr.io/xmpp-interop-testing/xmpp_interop_tests:<version> \
--domain=example.org \
--host 127.0.0.1 \
--adminAccountUsername=admin \
--adminAccountPassword=adminYou can build the Docker image locally, using docker build . -t xmpp_interop_tests.
The test execution logs (as described in 'Log XMPP traffic in files' below) will be saved in the /logs/ directory in the container. To make it easy to access these logs, the example above uses a bind mount to store them on the host machine.
To see full usage instructions for the container, you can see the help text by running:
docker run xmpp_interop_tests --helpAs usual, identical to the docker commands, substituting docker with podman.
The repository contains a dedicated Containerfile to build the OCI image without the need for specifying or configuring search repositories.
A Smack Debugger implementation is included, that, once configured, will store debug logs (containing XMPP traffic) in distinct files, per test that's executed.
To enable this logging, this system property is to be added to the invocation of these tests:
-Dsinttest.debugger=org.igniterealtime.smack.inttest.util.ModifiedStandardSinttestDebuggerMetaFactoryAn additional system property is to be used to identify the directory in which the logs are to be stored. This directory will be created, if it doesn't already exist.
-DlogDir=target/logs