Hi,
I have the following testng.xml
<suite name="TestAll">
<test name="test1">
<classes>
<class name="com.samit.Config" />
<class name="com.samit.TestA" />
<class name="com.samit.TestB" />
</classes>
</test>
<test name="test2">
<classes>
<class name="com.samit.Config" />
<class name="com.samit.TestC" />
</classes>
</test>
</suite>
I have a maven project in eclipse and using the failsafe plugin I can run all these tests using maven install/verify command. The @BeforeTest/@AfterTest methods are part of the Config class and they correctly run before and after all the tests within the <test> tag
@BeforeTest Method
TestA
TestB
@AfterTest Method
@BeforeTest Method
TestC
@AfterTest Method
I can also run these by creating a TestNG Run configuration using testng eclipse plugin and choosing the suite.xml option to point to the testng.xml file
My Question now is
Using the testngplugin how can I run a single test with the @BeforeTest and @AftrerTest Config methods being run.
I can choose the "class" option in the run configuration but it only executes the @Test method from the class chosen without running @BeforeTest method from the Config class
The Config class just has @BeforeTest and @AfterTest methods.
Thanks,
Samit