Integration tests for Openfire XMPP server, focusing on federation scenarios. These tests verify server-to-server (S2S) communication, user authentication, and message routing in a federated environment.
These tests run against a federated Openfire environment provided by the openfire-docker-compose project, which is included as a Git submodule. That project provides:
- A complete Docker-based federation environment
- Network configuration for server-to-server testing
- Certificate management infrastructure
- Pre-configured users and databases
For full details of the test infrastructure, see the openfire-docker-compose documentation.
- Java 17 or later
- Docker and Docker Compose
The docker-compose-based test environment currently requires a local Openfire Docker image tagged as openfire:latest
. To build this:
- Clone the Openfire repository:
git clone https://github.com/igniterealtime/Openfire.git
cd Openfire
- Build the Docker image:
docker build -t openfire:latest .
- Clone this repository:
git clone https://github.com/surevine/openfire-integration-tests.git
cd openfire-integration-tests
- Initialise and update the openfire-docker-compose submodule:
git submodule update --init
The project uses Maven Wrapper (no local Maven installation required).
./mvnw verify
# Run a single test class
./mvnw verify -Dit.test=ConnectAndAuthenticateIT
# Run a specific test method
./mvnw verify -Dit.test=FederatedChatIT#federatedMessageTest
By default, the tests will use the latest
tag of the Openfire Docker image. You can specify a different version by setting the OPENFIRE_TAG
environment variable:
# Run tests with a specific Openfire image tag
OPENFIRE_TAG=4.7.5 ./mvnw verify
# Or set for your shell session
export OPENFIRE_TAG=4.7.5
./mvnw verify
Make sure you have built the Openfire image with the corresponding tag:
docker build -t openfire:4.7.5 .
The test environment comes with pre-configured users:
Server 1 (xmpp1.localhost.example):
- user1/password
- user2/password
Server 2 (xmpp2.localhost.example):
- user3/password
- user4/password
- Pull latest changes:
# Update main repository
git pull
# Update openfire-docker-compose submodule to latest version
git submodule update --remote
- When switching branches or updating submodule reference:
git submodule update --init
This project is licensed under the same terms as Openfire. See Openfire's license for details.