Open JFRabbit opened 5 years ago
@JFRabbit - The latest released version of TestNG is 7.0.0-beta5
. Please retry using that and post back your results.
Please note, that the TestNG team does not own the IntelliJ testng plugin. Please try running your test via a suite xml file. If it works via the suite xml file, but doesn't using the IntelliJ plugin, then you may have to file a bug with the IntelliJ team to get it sorted out there.
@krmahadevan - I can't found 7.0.0-beta5, and I did below:
package tmp;
import org.testng.annotations.Test;
public class ClassAWithLowerPriority {
@Test(priority = 1)
public void lower(){
System.out.println("lower");
}
}
package tmp;
import org.testng.annotations.Test;
public class ClassBWithHigherPriority {
@Test(priority = 2)
public void higher(){
System.out.println("higher");
}
}
run result: higher lower
@JFRabbit - I am still not able to understand what the issue is.
Can you please do the following
7.0.0-beta5
[ Its available in bintray here ]Reproducing this issue with 6.14.3
is not going to help, because we can't fix anything in that version.
@krmahadevan - I upload a maven project with zip: foobar.zip
You can run below cases and compare difference between version 7.0.0-beta5 and 6.14.3:
Case1:
run foobar/foobar.xml with version 7.0.0-beta5: you can get result: priority 1 priority 2 priority -1
run foobar/foobar.xml with version 6.14.3: you can get result: priority -1 priority 1 priority 2
Case2: change foobar/foobar.xml line 6:
<package name="tmp.old"/>
run foobar/foobar.xml with version 7.0.0-beta5: you can get result: priority 1 priority 2 priority 3 priority 4 priority -1
run foobar/foobar.xml with version 6.14.3: you can get result: priority -1 Test ignored.
The case2 proved issue doesn't reproduce on version 7.0.0-beta5. The case1 proved function of "priority" have changed between 6.14.3 and 7.0.0-beta5.
So I think this issue doesn't reproduce on version 7.0.0-beta5 cause the change of "priority", doesn't mean fixed. Maybe the "change" is also a bug. Please confirm.
Thanks for the sample. The behavior is strange and not expected but the initial issue looks already be fixed :) Next step, manage -1 priority.
@krmahadevan Any time to have a look on it?
@juherr - I will try to get to this. A bit held up at the personal front.
TestNG Version
Is the issue reproductible on runner?
Test case sample
XML:
2 classes: