aspose file tools*
The moose likes Testing and the fly likes TestNG. How to skip data driven tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "TestNG. How to skip data driven tests" Watch "TestNG. How to skip data driven tests" New topic
Author

TestNG. How to skip data driven tests

Sergey Zhylinsky
Greenhorn

Joined: Nov 15, 2013
Posts: 23
Hello,

The issue is how to terminate data driven tests in TestNG, i.e. tests, that use data provider (a method with @DataProvider annotation). When we have different test-methods (methods with @Test annotation) we can define an attribute "dependsOnMethods" for one of them. For instance:



In this case, when the method "checkHttpResponse" failes, method "authorize" will be skipped.

And how to achieve that when we call the same method for different data? The code below



will result in several failed tests. But I want remaining data-driven tests to be skipped when one of them failes.

Thanks in advance
Sergey Zhylinsky
Greenhorn

Joined: Nov 15, 2013
Posts: 23
Thanks for everybody who has read the topic. I've coped with that by myself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TestNG. How to skip data driven tests
 
Similar Threads
dependsONMethods in testNG and Maven
Unable to run DataSource related testcases in TestNG with command prompt
How to have different data provides in TestNG
most important feature in TestNG
Dataprovider in TestNg