dependsOnMethod cyclic dependencies detected when none exist?
This post has NOT been accepted by the mailing list yet.
I am trying to write tests using TestNG, and have a problem that has appeared on a couple of occassions. I have tried searching existing forums, but the only related things I found were announcements on the dependsOnMethods element and someone having an issue when they didn't use the dependsOnMethods element.
My specific problem is that if I have a class with, say, 4 methods that are annotated as "@BeforeMethod" called A, B, C and D, and they have the following "dependsOnMethods" annotations:
A depends on B
B depends on C
C depends on D
D depends on nothing
I will get a "cyclic dependency" error when I try to run the tests on all 4 methods. As far as I see, there are no cyclic dependencies - the dependencies should just result in an execution order of D, C, B, A.
Did I miss some quirk of TestNG in the documentation, or is this a bug? If anyone has seen this before, if there a way around it?