HI Punnadi,

Yes you can, If you need to call initWithTenantCreation() only once for set
of test case. put it in side @BeforeTest method,
Create a separate test case with @BeforeTest method and implement the logic
that you need to call once for set of test cases. You can refer a sample
implementation of @BeforeTest in[1].

After that  group the test cases inside a one test instance in testng.xml

    <test name="[test name]" preserve-order="true" parallel="false">
        <classes>
            <class name="[Test case with @BeforeTest ]"/>
            <class name="[Testcase1]"/>
             <class name="[Testcase2]"/>
        </classes>
    </test>

If all the test cases are in same package, you can use" <packages><package
name=""</packages>"  instead of   <classes>....</classes>.


[1]
https://github.com/wso2/product-apim/blob/master/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerConfigurationChangeTest.java
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to