cbeust/testng — Issue #173: Dependent methods executed out-of-order if method names match across classes
Author: raghubs81
Created: 2012-02-21 07:34:17+00:00
State: open

Below is the summary of my test files

- There are two classes "ClassA" and "ClassB".
- ClassA has two test methods test1() and test2()
- Test method "test2 ()" depends on "test1 ()".
- ClassB has three test mehtods test1(), test2() and testX()
- Test method "test1 ()" depends on "test2 ()".
- Test method "test2 ()" depends on "testX ()".

I have an XML file that includes the above two classes with
"preserve-order" set to "true". Upon execution I get the following output.

Output:
____________

[ClassA] Test-1
[ClassA] Test-2
[ClassB] Test-X
[ClassB] Test-1
[ClassB] Test-2
____________

Please note that in ClassB "test1()" depends on "test2()". So, "test2()"
should have executed before "test1()". We find this behaviour only if the
same function names ( That is "test1" and "test2" ) is used in both
"ClassA" and "ClassB".

I have sent an email to testng-dev mailing-list with a .zip of sources.
Link: http://groups.google.com/group/testng-dev/browse_thread/thread/6ac8e8675dad84a9

Thanks,
Raghu