Version 8

    Functional Tests

     

    Functional tests need to be located in the module which they test. The testsuite needs to be able to include these in the "tests" target.

     

    To contribute functional tests to the testsuite, each module should contain a tests directory with with a build.xml.  The build.xml should contain at least one target, functional-tests, which executes JUnit tests.  The functional-tests target should build the tests, but should assume that the module itself has been built.  The tests/build.xml should use the Ant <import/> task to reuse targets and property definitions from the module's main build.xml.

     

    Functional test source code belongs in the tests/src directory.

     

    The package structure of the tests should mirror the module's package structure, with an additional test package below org/jboss.  For example, classes under org.jboss.messaging.core should have tests under org.jboss.test.messaging.core. 

     

    Integration with Testsuite

     

    The testsuite/build.xml will include a functional-tests target which uses the task to call the funtional-tests target on each module's tests/build.xml.  The testsuite will only override properties relevant to the junit execution, and the module's tests/build.xml must use these properties as values for the corresponding attributes:

    junit.printsummary
    junit.haltonerror
    junit.haltonfailure
    junit.fork
    junit.timeout
    junit.jvm
    junit.jvm.options
    junit.formatter.usefile
    junit.batchtest.todir
    junit.batchtest.haltonerror
    junit.batchtest.haltonfailure
    junit.batchtest.fork
    

    The following properties are not set by the testsuite (?):

    junit.sysproperty.log4j.configuration
    junit.sysproperty.*
    

     

     

    See the FunctionTestExampleBuild for an example of what your tests/build.xml should look like.