org.wso2.carbon.integration.common.extensions.carbonserver
Class TestServerManager

java.lang.Object
  extended by org.wso2.carbon.integration.common.extensions.carbonserver.TestServerManager

public class TestServerManager
extends Object

A TestServerManager is responsible for preparing a Carbon server for test executions, and shuts down the server after test executions.

All test suites/classes which require starting of a server should extend this class


Constructor Summary
protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context)
           
protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context, int portOffset)
           
protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context, String carbonZip)
           
protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context, String carbonZip, Map<String,String> commandMap)
           
 
Method Summary
 String getCarbonHome()
           
 String getCarbonZip()
           
 Map<String,String> getCommands()
           
protected  String startServer()
          This method is called for starting a Carbon server in preparation for execution of a TestSuite

Add the @BeforeSuite TestNG annotation in the method overriding this method

protected  void stopServer()
          This method is called for stopping a Carbon server

Add the @AfterSuite annotation in the method overriding this method

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestServerManager

protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context)

TestServerManager

protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context,
                            String carbonZip)

TestServerManager

protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context,
                            int portOffset)

TestServerManager

protected TestServerManager(org.wso2.carbon.automation.engine.context.AutomationContext context,
                            String carbonZip,
                            Map<String,String> commandMap)
Method Detail

getCarbonZip

public String getCarbonZip()

getCarbonHome

public String getCarbonHome()

getCommands

public Map<String,String> getCommands()

startServer

protected String startServer()
                      throws Exception
This method is called for starting a Carbon server in preparation for execution of a TestSuite

Add the @BeforeSuite TestNG annotation in the method overriding this method

Returns:
The CARBON_HOME
Throws:
IOException - If an error occurs while copying the deployment artifacts into the Carbon server
Exception

stopServer

protected void stopServer()
                   throws Exception
This method is called for stopping a Carbon server

Add the @AfterSuite annotation in the method overriding this method

Throws:
Exception - If an error occurs while shutting down the server


Copyright © 2015 WSO2. All rights reserved.