Hi All,

I'm using Factories in TestNG to instantiate tests dynamically for
different parameter sets. And I have configured the test class inside a
<test> block in the testng.xml as below.

<test name="Test - IS - OpenID" preserve-order="true" parallel="false">
    <classes>
        <class 
name="org.wso2.identity.integration.test.openid.OpenIDSSOTestCase"
/>
    </classes>
</test>

When running this test on the TAF 4.3.1 I found that the methods annotated
with 'BeforeTest' and 'AfterTest' runs for each test instance instantiated
with the factory.
But when running the same test on an earlier version of TAF, methods
annotated with 'BeforeTest' and 'AfterTest' are executed only once, which
is the expected behavior [1].

I found that TAF 4.3.1 is using TestNG 6.1.1 where as earlier versions of
TAF use TestNG 6.8. Seems this issue is with TestNG 6.1.1 version. This is
also reported in [2].

Is there a specific reason to downgrade the TestNG version in TAF 4.3.1 ?
In that case, what would be the way to achieve the expected behavior ?

[1] http://testng.org/doc/documentation-main.html#annotations
[2] http://osdir.com/ml/java-testng-user/2011-07/msg00166.html

Thanks,
Malithi.
-- 

*Malithi Edirisinghe*
Senior Software Engineer
WSO2 Inc.

Mobile : +94 (0) 718176807
[email protected]
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to