-
Notifications
You must be signed in to change notification settings - Fork 4
How to test
In order to ensure that no loss or change of functionality occurs when extending the codebase, functional tests must be written. Each such test suite applies to a single part of code (usually a single module) and is written according to an RFC/XEP. The main RFC here would be XMPP Core.
The workflow of writing a test suite is as follows:
-
Pick the module to write the suite for. E.g. for
mod_privacy
, the test suite would be calledprivacy_SUITE
. All the suites are located in$EJABBERD_GIT/test/suites
. -
While writing the test cases add them to
$EJABBERD_GIT/test/run_common_test.erl
. Leading comma allows for fast and easy selecting of a single suite/group/test to run, which speeds up development (no need to wait for all tests to pass, when writing a single one). -
Write a test case according to the RFC/XEP and ensure the unmodified ejabberd functions correctly.
-
Refactor/extend the codebase.
-
Ensure no functional regressions occured or that the new code works as expected by the specification(s).
Changing directory to $EJABBERD_GIT/test
and running:
$ make test_clean
will make the tests specified in
$EJABBERD_GIT/test/run_common_test.erl
run. The results are available
in $EJABBERD_GIT/test/reports
.
What do we need to do?
- zabbix template for an ejabberd node
- graphs
- graphs comparing different nodes
- remote access to the lab
- don't forget:
mnesia extra_db_nodes "['ejabberd@nodename']"
invm.args
(doesn't work anymore during runtime, must be passed as arguemnt at startup) - strip ejabberd.cfg of unimportant cruft (unused modules, conf examples, ...)
- hostnames! old script does its job good enough (/etc/init.d/ejabberd-setup)
- make tsung dump XML stanzas