Closed vadipp closed 13 years ago
This is probably related to issue 71, but I decided to file a new issue.
The "Comment and close" button was too close :)
I'm aware of this limitation, this is how TestNG is implemented, right now: dependencies work on the class level, not on the instance level. When you depend on a method, you really depend on this method, not on "this method on instance xxx". TestNG currently doesn't make this distinction, hence the result you're seeing.
The only workaround right now is to call your methods together instead of using dependencies.
I'm considering ways to change this behavior but it's not trivial.
This should be fixed in the beta, can you try it and report back? http://testng.org/beta
I've just checked and it seems to work in the 6.1.2 beta. Thanks, Cedric!
I'm still concerned about the test method order, I'll report a separate bug.
This one is closed.
Hello!
I'm using the (currently latest) TestNG 6.1.1.
I'm having the same issue as Jeff Weiss posted here: http://jira.opensymphony.com/browse/TESTNG-329?focusedCommentId=33613&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_33613
Here is my sample test class:
Here is what I get:
A test failure in one data row means that all tests which depend on it be skipped for all subsequent data rows. This is not correct, because only the test method of the current data row should be skipped.
Also a weird behaviour is that first all
test1()
methods try to run, thentest2()
. (this can be seen if you comment out theAssert.fail()
line.We have test classes which represent complex scenarios, and the test methods are steps in these scenarios, thus dependencies between test methods are a usual thing.