Hi,
I have to write the following unit test cases in testng:
1) saveProductTest which would return productId if product details are saved successfully in DB.
2) modifyProductTest, it should use previously saved productId as a parameter.
I am taking the product details input(PrdouctName, ReleaseDate) for saveProductTest and modifyProductTest method from an XML file using testNg data providers.
Since productId is generated in save method, I have to pass it to the modify method.
What is the best way to pass output of one test method to another method in testng.
Thanks in advance.