Hi Dharashana, Test Automation Framework provides infrastructure facilities to develop and execute automated tests. You can setup your test environment using test automation framework before you run your automated test cases. Test Automation Framework provide this environment preparing facility ( start up servers.....etc) to users through providing extending points to test automation framework. It allow users to plug custom classes to testng listener interfaces and implement their own tasks in the flow of test execution.
We have provided this server startup facility as a pluggable class[3] a to a testng listeners [1]. Then we have registered that pluggable class in the automation.xml file ( you can find this file in the resources folder inside your test suite) [2] which has all the configuration details for your test execution as follows <listenerExtensions> <platformExecutionManager> <extentionClasses> <class> <name> org.wso2.carbon.integration.common.extensions.carbonserver.CarbonServerExtension </name> <!--<parameter name="-DportOffset" value="0" />--> <!--<parameter name="cmdArg" value="debug 5005" />-->............. ............ What happens in the test execution is , the test automation framework looks for the registered pluggable classes inside the automation.xml and execute those classes within appropriate phase of the test execution. ( ex : Server startup pluggable class is executed before test cases execution phase ). You can write your own pluggable classes using the set of interfaces by test automation framework and registered those classes to do own tasks within the test execution similarly. For configuring before starting up servers, we haven't provide that facility through test automation framework yet. AFAIK this can be achieved using the Deployment Automation Framework which is still under development [ Please refer "Architecture of Deployment Automation Framework" mail thread in the architecture list for more info ] (you can pass limited number of params to server starting-up task as you can see above provided xml snippet). [1] https://docs.wso2.com/display/TA430/TestNG+Listeners [2] https://docs.wso2.com/display/TA430/Automation.xml+File [3] https://github.com/wso2-dev/carbon-platform-integration-utils/blob/master/common-framework-extensions/src/main/java/org/wso2/carbon/integration/common/extensions/carbonserver/CarbonServerExtension.java Regards, Malintha Adikari On Fri, Oct 10, 2014 at 10:03 AM, Darshana Akalanka Pagoda Arachchi < darsha...@wso2.com> wrote: > Hi all, > > In the Message Broker test suit we have test cases which automatically run > the products and then runs tests on it. I however do not have a clear idea > on how the products gets deployed. > > All we have is a base test class which is extended by other test classes > which is as follows. > > > ---------------------------------------------------------------------------------------------- > *import org.apache.commons.logging.Log;* > *import org.apache.commons.logging.LogFactory;* > *import org.wso2.carbon.automation.engine.context.AutomationContext;* > *import org.wso2.carbon.automation.engine.context.TestUserMode;* > > */*** > * * Base class of all MB integration tests* > * */* > *public class MBIntegrationBaseTest {* > > * protected Log log = LogFactory.getLog(MBIntegrationBaseTest.class);* > * protected AutomationContext automationContext;* > * protected String backendURL;* > > * protected void init(TestUserMode userMode) throws Exception {* > * automationContext = new AutomationContext("MB", userMode);* > * backendURL = automationContext.getContextUrls().getBackEndUrl();* > * }* > > *}* > > > ------------------------------------------------------------------------------------------------------- > > The pom file for this module is attached and I believe is responsible in > copying and extracting the built product to a working directory to test. > > I want to write a test which alter the configurations of the products > before the product is deployed. Is this possible? Please advice. > > Thanks, > -- > *Darshana Akalanka Pagoda Arachchi,* > *Software Engineer* > *078-4721791* > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Malintha Adikari* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile: +94 71 2312958 Blog: http://malinthas.blogspot.com Page: http://about.me/malintha
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev