Re: DataDriven - executing scripts multiple times without dataprovider method
>>> QUERY 1: Can you suggest a method to RUN @TEST method multiple times without using @data provider.
When the data provider was built in TestNG to solve this exact purpose, can you please help us understand as to why you donot want to use a data provider ? If you use a data provider, then every single row from your data provider is considered as a distinct test iteration. If you resort to using a for..loop then all the iterations are considered as 1 single iteration. Also remember that when you use a data provider, TestNG will continue to run the remaining iterations irrespective of failures in between. That will not be the case, when you run the tests via a for..loop without explicitly adding try..catch logic and resorting to gobbling of exceptions.
>>> QUERY 2 : I will have a master excel sheet which contains all the test cases with a "YES" or "NO" flag and testcases(@test) with "YES" flag must be executed.Is this feasible with using TestNG
Yes you can do this very easily from within a data provider. All you need to do is retrieve your data from your spreadsheet, and then filter out all rows that contain a value of "YES" and then run them.