Overview

  • The Controls test root is controls/test
  • There are two categories of Controls tests:
    • Checkin tests: Tests which should be run after making changes to the Beehive Controls code base and before you commit to SVN. Checkin tests are for testing that basic functionality is working correctly.
    • Detailed tests: Tests which provide greater coverage that checkin tests but which are not required for basic functionality. These tests should be considered for running before a checkin which may affect a substantial part of the code base.
  • Controls tests are broken into four pieces:

    Controls

    The Controls used for testing

    controls/test/src/controls

    Drivers

    The logic of the test (See Milton)

    controls/test/src/drivers

    Units

    The JUnit accessors

    controls/test/src/units

    Webapps

    The Webapps where Controls web clients live: JWS, JPF, JWS

    controls/test/webapps/controlsWeb


Running Tests

Here are a few tips to help your run Beehive Controls tests. This doc. assumes that you have your Beehive invironment setup correcty.

  • To run test suites try the following:
    • ant checkin.tests will run Controls checkin tests (See above)
    • ant detailed.tests will run Controls detailed tests

If you do not use checkin.tests or detailed.tests targets which start tomcat, deploy webapps, and stop tomcat, you'll need to do it yourself.

  • To start/start Tomcat use the following from controls/test
    • ant tomcat.start
    • ant tomcat.stop

To deploy and undeploy webapps to a running instance of Tomcat use the ensure.deployed target in controls/test/webapps

  • ant ensure.deployed
  • ant undeploy

To run a more specific set of tests try the following:

  • ant run -Dtch.test-names="*.*JUnitClassName.testMethod*"
  • ant run -Dtch.test-names="org.apache.beehive.controls.test.jpf.instantiate.TestInstantiate.testDeclarativeInstantiation"

Tools

Beehive Controls tests make use of a number of custom tools.

  • No labels