I have a group of tests that are created using an @Factory method, and
are part of a larger suite that I've defined in an xml file. I'd like
these tests to run against one of several environments which are at
different URLs. For normal @Test methods this is not a problem because
in the @BeforeSuite period of testng's lifecycle I can simply call a
method in a class which has the appropriate set-up hard coded.
@Factory runs before @BeforeSuite however, so I can't rely on the same
mechanism.
Is there any way to access the testng framework dynamically to
determine which xml file was used to configure the current test run?