Hi,

I was trying to configure a TestNG group exclusion based on profile and finding 
the tests weren't being excluded. After checking everything I could think of 
and getting nowhere, I checked out the Surefire code and attached a debugger.

I found this must have been broken since TestNG 5.13.0.3 (I'm using TestNG 
latest, 6.3.1). AbstractSurefireMojo.convertGroupParameters() uses 
"excludedgroups"  for the property key:

        if ( this.getExcludedGroups() != null )
        {
            getProperties().setProperty( "excludedgroups", 
this.getExcludedGroups() );
        }

However, since 5.13.0.3, org.testng.CommandLineArgs has changed to 
"excludegroups" (the hyphen is added later during options conversion):

  public static final String EXCLUDED_GROUPS = "-excludegroups";
  @Parameter(names = EXCLUDED_GROUPS, description ="Comma-separated list of 
group names to "
      + " exclude")
  public String excludedGroups;

See "Replaced Constants", August 03, 2010, Commit 
55cd8fe791efec01c80a0199de9d187d2c836801

https://github.com/cbeust/testng/commit/55cd8fe791efec01c80a0199de9d187d2c836801#src/main/java/org/testng/CommandLineArgs.java

Has this been reported before? I can't find any issues or discussion of this 
anywhere, but I can't believe it's been broken for 18 months without anyone 
noticing - what am I missing?

In any case, I'd consider this a TestNG bug anyway, I'll email 
[email protected]<mailto:[email protected]> requesting that 
both forms are recognised to ensure backwards compatibility once I get 
confirmation I'm not going bonkers.

Cheers,
Danny

This email and any attachments may contain confidential and proprietary 
information of Blackboard that is for the sole use of the intended recipient. 
If you are not the intended recipient, disclosure, copying, re-distribution or 
other use of any of this information is strictly prohibited. Please immediately 
notify the sender and delete this transmission if you received this email in 
error.

Reply via email to