Shankar,
Answer to your question : No you cannot get a handle to the currently running TestNG instance, because there is no mechanism defined in it.
If you are using maven, then you could essentially define a property as below :
<properties>
<testSuite>src/test/resources/suiteBuildTests.xml</testSuite>
</properties>
and then refer to this property value in your surefire plugin as below :
<suiteXmlFiles>
<suiteXmlFile>${testSuite}</suiteXmlFile>
</suiteXmlFiles>
In your continuous integration job, you can override the value for this property using the VM arg as
-DtestSuite=faile-suite.xml
Wouldnt that help ?
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
You received this message because you are subscribed to the Google Groups "testng-users" group.