I have a class called ProviderOrgLDAPConfigurationTest in package com.hp.csa.unit.gui.smc.organizations, with a single test method with signature
@Test(priority = -1000)
public void configureLDAPForProviderOrgIfRequested() throws Exception {
When I run my suite, which has this TestNG suite file:
<suite name="CSASmcGuiUnitTestSuite" >
<test name="CSASmcGuiUnitTests" >
<packages>
<package name="com.hp.csa.unit.gui.smc.*" >
<exclude name="com.hp.csa.unit.gui.smc.dashboard.codar" />
<exclude name="com.hp.csa.unit.gui.smc.releaseautomation.*" />
</package>
</packages>
</test>
</suite>
The test method runs first, as I intend it to. The majority of my ~80 tests under the package specified in the suite file do not specify priority at all; one specifies priority = -1. The tests all run in the order I expect - first the -1000 runs, then the -1, which is in a OrganizationsTest in the same package, then all the tests that don't specify priority (again, ~80, in various packages) run in a seemingly random, but consistent between runs, order.
If I do nothing else but rename the class to CSAProviderOrgLDAPConfigurationTest, it no longer runs first. Other tests in different packages, that don't specify priority, now run first.
I first noticed this when, in addition to the rename, I also changed the package to com.hp.csa.unit.gui.smc.organizations.csa. I couldn't figure out why that would matter, but assumed the package change was the issue, so I put the class back in its original package. But unless I additionally renamed it back to its original class name, this test method with a priority of -1000 would not run first.
In addition, the test with priority of -1 would not run 2nd as it should unless I addressed the -1000 problem by renaming it back to its original name.
I'm using 6.9.6. Also tried 6.9.12, no help.
Any ideas?
Thanks.
-mike