I am beginner to TestNG. I about test method in official TestNG documentation. I am not clear with the use of allow-return-values="true"
can any one explain it briefly with example. I did one example I didn't get way the way of using,
This is my .xml
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="newSuite" parallel="methods" thread-count="5" allow-return-values="true">
<parameter name="browser" value="Firefox"></parameter>
<test name="dataprovider" allow-return-values="true">
<classes>
<class name="com.tets.SampleTest"></class>
</classes>
</test>
</suite>
and my test class is as follows,
public class SampleTest {
@AfterMethod
public void teardown(Object returnValueFromTest){
//inspect returnValueFromTest and perform necessary clean up.
}
@Test
public String testEventGeneration(){
//generate event
//returning generated e vent id.
return "E1234";
}
@Test
public String testMarketGeneration(){
//generate market
//returning generated market.
return "hai";
}}
How and where can I get the return value from testMarketGeneration
test method ?