
Both services are available in the default ejabberd installation.
#Ejabberd test escalus make quicktest code#
The code above announces addresses for clients to connect using BOSH and WebSockets. Substitute with the domain name of your ejabberd XMPP server. The first file is an XML document without any extension defined in its name. One way or another, it should allow http and https access to two files:

To pass this test you need a web daemon on your ejabberd XMPP server. XEP-0156: Discovering Alternative XMPP Connection Methods (HTTP) Once you configure ejabberd XMPP server with custom_headers, it will pass this XMPP compliance test. Execute the following command: chown ejabberd:ejabberd /var/www/upload Make sure /var/www/upload directory is owned by ejabberd. "Access-Control-Allow-Headers": "Content-Type" Make sure it’s allowed by your server’s firewall. Remember that file upload operates on port 5443.

I also recommend creating a dedicated directory at /var/No PHP scripts or web servers. You need to configure ejabberd to add custom headers to pass this XMPP compliance test. XEP-0363: HTTP File Upload (CORS Headers) I’m assuming the configuration from my previous two tutorials on setting up your ejabberd real time IM server and configuring ejabberd video & voice calling. To get a 100% result, you need to configure a few things to pass the remaining 3 tests. This web site is dedicated to help you use and develop for ejabberd XMPP messaging server. Luckily, Daniel Gultsch and Rishi Raj created an XMPP compliance test that will assist you in this process.Įjabberd XMPP server passes most of the XMPP compliance test checks out-of-the box, in default configuration. Testing your ejabberd configuration can be a tricky task. If you have specific questions, first be sure to consult the official ejabberd documentation. Your best place to start is this hands-on ejabberd installation tutorial and this ejabberd STUN/TURN tutorial. But configuring everything requires several steps. The server is restarted again.Your ejabberd XMPP server is a powerful piece of software. In the end_per_suite previously backuped config file is restored and The expected certificate files exists and then produces new config file.Īt the end it restart the server so that the new configuration can be applied. The above snippet backups current server's config file, asserts that The quicktest configuration is a relatively comprehensive one, giving good overview of what does and what doesnt work in the system, without repeating tests.

Make_ejabberd_node_require_starttls( Config) -> ejabberd_node_utils: modify_config_file(, Restore_ejabberd_node( Config) -> ejabberd_node_utils: restore_config_file( Config),Įjabberd_node_utils: restart_application( ejabberd).Īssert_cert_file_exists() -> ejabberd_node_utils: file_exists( ? CERT_FILE) orelse ct: fail( "cert file ~s not exists ", ).

Make_ejabberd_node_require_starttls( Config1),Įjabberd_node_utils: restart_application( ejabberd), Setup_ejabberd_node( Config0) -> Config1 = ejabberd_node_utils: init( Config0),Įjabberd_node_utils: backup_config_file( Config1), Init_per_suite( Config) -> setup_ejabberd_node( Config).Įnd_per_suite( Config) -> restore_ejabberd_node( Config). In order to do this define configuration variables in nfig file, for example: It is possible to run tests for various ejabberd configurations. Make quicktest TESTSPEC=custom.spec ADD_OPTS="-pa /full/path/to/erlcloud/ebin" Testing various server configurations Of course TESTSPEC and ADD_OPTS can be specified at the same time: Make quicktest ADD_OPTS="-pa /full/path/to/erlcloud/ebin" spec file (for example to add other suites or remove the existing ones) one must add it to one of the mentioned commands:Īdditional erlang binaries required by custom suites can be added to the path by providing ADD_OPTS parameter to the make command.
#Ejabberd test escalus make quicktest full#
