Hi there, I have a project that use XMPP (Smack).
And I need to do some unit tests in my code.
Currently, I created a sidecar container with docker running Prosody XMPP Server when running unit tests for my project. I mainly use MUC with Anouymous SASL login of XMPP.
Is that possible to start openfire in my unit tests code?
It may like below :
OpenfireServer server = new OpenfireServer("localhost",5280);
server.start();
I’m not aware of a way to run Openfire embedded in another process. I suspect that this might be difficult, given the complexity of the system. Even Openfire’s own unit tests don’t do this, and instead use various mocks for subsystems.
Quite recently, we’ve started experiments with creating Github Actions to run integration tests. For that work, we started splitting off the starting and stopping of Openfire from the test script itself. You can look at that work in progress here.