This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Common Tests
Introduction
There are integration test scenarios common to all WSO2 products. Implementing tests for those common scenarios in each product might introduce test duplication and test management difficulties. Thus, a set of common tests are introduced under the framework utilities module which can be used directly by extending the test classes.
ServerStartupBaseTest
The purpose of this test class is to detect errors/exceptions at the carbon server startup time. In the case of a server startup error, the test class will print the error in the server startup console and throw an assertion failure. You can use this test case by extending the ServerStartupBaseTest class.
import org.wso2.carbon.automation.utils.tests.ServerStartupBaseTest; public class ServerStartupTestCase extends ServerStartupBaseTest {}
Note that you need to include this test case to a separate test suite xml and set it to run just after starting the carbon server.
<test name="as-integration-tests" preserve-order="true" parallel="false"> <classes> <class name="org.wso2.carbon.as.integration.tests.ServerStartupTestCase"/> </classes> </test>
OSGIServerBundleStatusTest
The purpose of this test class is to detect component bundles which are in the Unsatisfied state. In this test case, another instance of carbon server gets started to verify bundle states just after starting the server.
import org.wso2.carbon.automation.utils.tests.OSGIServerBundleStatusTest; public class OSGIBundleStatusTestCase extends OSGIServerBundleStatusTest {}