Testing Backoffice Extensions

You can run tests from backoffice/testsrc directories of Backoffice extensions.

Each Backoffice extension has a directory called backoffice. Programmers can place in it source code extending Backoffice functionalities, and add tests. It differs from regular source and source directories in that these classes require that the backoffice extension be loaded together with web libraries.

When an extension contains a web module, it may contain a web/testsrc directory. The ant allwebtests command picks up tests from there and spins up Platform with web context.

Some Backoffice extensions don't have web modules. Nevertheless, the testing framework treats the backoffice/testsrc directory of an extension as a web test directory. You don't have to add a web module to such an extension. To invoke a test from backoffice/testsrc directory, execute ant allwebtests.

Tests in web/testsrc are dependent on libraries in web/webroot/WEB-INF/lib. Tests in backoffice/testsrc are dependent on libraries in web/webroot/WEB-INF/lib of the backoffice extension.