Version 37

    How To Run the JBoss Testsuite

     

    You must have a source distribution of JBoss to run the testsuite.  This document applies only to JBoss 3.2.7 and above.

     

    Build JBoss

     

    Before building the testsuite, the rest of the project must be built:

     

    Unix

    Windows

    cd build
    ./build.sh
    cd build
    build.bat

     

     

    Build the Testsuite

    To build the testsuite, type the following.

     

    Unix

    Windows

    cd ../testsuite
    ./build.sh main
    cd ../testsuite
    build.bat main

     

    Run the Testsuite

    To run the testsuite, type the following.  Note that you no longer are required to seperately start a JBoss server instance before running the testsuite. This is very important-- you must not have a JBoss instance running before you run the testsuite.

     

     

    Unix

    Windows

    cd ../testsuite
    ./build.sh tests
    cd ../testsuite
    build.bat tests

     

    The build script will start and stop various configurations of JBoss, and then run tests against those configurations.

     

    Running One Module at a Time

    To run a single module at a time, you will need to start the appropriate configuration. For most tests, this will be the "all" configuration. Then

     

     

    Unix

    Windows

    cd ../testsuite
    ./build.sh -Dtest=${module} test
    cd ../testsuite
    build.bat -Dtest=${module} test

     

    where ${module} is the module you want to test.

     

    Running One Test at a Time

     

    To run an individual test, you will need to start the appropriate configuration.  For most tests, this will be the "all" configuration:

     

    build/output/jboss-5.0.0alpha/bin/run.sh -c all

     

    And then tell the testsuite which test you want to run:

     

    cd testsuite
    ./build.sh one-test -Dtest=org.jboss.test.package.SomeTestCase

     

    Increasing server startup timeout

    By default jboss-test's <server:start> task waits for 120 secs for the server to start up.

    If you're server config takes more than 120 sec to startup with additional services deployed or on a really slow system you can override the server startup timeout by setting the jbossas.startup.timeout property.

     

    export ANT_OPTS="-Djbossas.startup.timeout=240"

     

    Clustering Tests Configuration

    Most of the tests are against a single server instance started on localhost.  However, the clustering tests require two server instances.  By default, the testsuite will bind one of these instances to localhost, and the other will be bound to hostname.  You can override this in the  testsuite/local.properties file.

    node0=localhost
    ...
    node1=MyHostname
    

     

    The nodes must be bound to different IP addresses, otherwise there will be port conflicts.  Also, note these addresses must be local to the box you are running the testsuite on; the testsuite will need to start each server process before running the tests.

    Special Configuration for Clustering Tests on Windows Machine

    localhost and hostname do not work properly on windows. Modify local.properties under testsuite to include following:

      • node0=an ip (not 127.0.0.1)

      • node1=an ip (not 127.0.0.1)

      • udpGroup=239... e.g. 239.13.14.15

     

    The key is that these properties need to be assigned to IP addresses not on the loopback interface.  You therefore need more than one IP address on the machine. To set multiple IP addresses on windows machine in qa lab, ask IT to do it as they keep track of IP addresses used. If you want to run in your laptop, follow these instructions:

    • Go to: Start > Control Panel > Network Connections > Local Area Network.

    • Click on properties.

    • Highlight Internet Protocol (TCP/IP) and select properties.

    • Click on advanced.

    • Click on "Add an IP"

    • Add the IP and "OK" all the way out.

     

    Isolate from the multicast traffic in the network

    If you want to be isolated from the network multicast traffic you can try this on a linux host (as root):

    route add -net 224.0.0.0 netmask 240.0.0.0 lo
    
    ifconfig eth0 -multicast
    ifconfig lo +multicast 
    

    Using iptables to block incomming multicast packets works well but blocking outgoing breaks testsuite.

     

    Running two instances of JBoss AS (clustered) on Fedora

    SeeRunTwoInstanceOfJBossInFedora.

     

    Viewing the Results

    A browsable HTML document containing the testsuite results is available under testsuite/output/reports/html, and a text report (useful for emailing) is available under testsuite/output/reports/text.

     

    Referenced by: