Previous Next vertical dots separating previous/next from contents/index/pdf

Testing Controls

Beehive controls can be tested either inside of an application container or outside in a standalone Java environment. Testing in a standalone Java environment is especially useful when running unit tests.

Beehive controls can be integrated into the JUnit test framework using the ControlTestCase base class. This base class provides a control container and provides help in instantiating a control declaratively via the
@Control annotation.

Note that not all controls can be tested within the test container because some controls have requirements beyond what ControlTestCase provides. For example, a control that uses JNDI lookups will not be testable with ControlTestCase. Likewise controls that take a dependency on a J2EE container (like the Service Control) may not be testable out of that J2EE container.

For details on testing controls with ControlTestCase see Control Tutorial: Testing Controls with JUnit.

Related Topics

Testing Controls with JUnit

 

Skip navigation bar   Back to Top