Hi Punnadi,
You can use @BeforTest annotation to execute a method only one time for a
test package. if you need to execute this method one time for all the test
classes in particular test module, You can write a extension class and
configure it in automation.xml to execute before test execution.

https://docs.wso2.com/display/TA430/TestNG+Listeners

Thanks,
Nuwanw

On Tue, Apr 28, 2015 at 4:47 PM, Punnadi Gunarathna <[email protected]>
wrote:

> Hi All,
>
> Currently "initWithTenantCreation" method in AppFactoryIntegrationTest
> class [1] is being called from all the test cases via their
> "setEnvironment" method [2].
> initWithTenantCreation method is used to populate tenant, default
> application. Is it possible to execute this type of methods once for all
> the test cases, rather than calling them for each test case separately.
> Please advice.
>
> [1]
> https://github.com/wso2/product-af/blob/master/modules/integration/integration-test-utils/src/main/java/org/wso2/appfactory/integration/test/utils/AppFactoryIntegrationTest.java
> [2]
> https://github.com/wso2/product-af/tree/master/modules/integration/tests-integration/tests-scenarios/src/test/java/org/wso2/appfactory/tests/scenarios
> --
> Thanks and Regards,
>
> Punnadi Gunarathna
> Senior Software Engineer,
> WSO2, Inc.; http://wso2.com <http://wso2>
> Blog: http://hi-my-world.blogspot.com/
> Tel : 94 11 214 5345
> Fax :94 11 2145300
>
>
>
>  <http://lalajisureshika.blogspot.com/>
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to