ASF GitHub Bot commented on SUREFIRE-1278:

GitHub user khospodarysko opened a pull request:


    Fix for issue SUREFIRE-1278


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/khospodarysko/maven-surefire master

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #121
commit bbe5dd237a2b1ba1a353bb51361d35dfa5996733
Author: Kostya Hospodarysko <khospodary...@lohika.com>
Date:   2016-09-15T22:08:42Z

    Fix for SUREFIRE-1278 - TestNG tests are run with group name that ends with 
specified group.

commit 16bfc7c93f697b7a50ef2b041ba7e000754049c7
Author: Kostya Hospodarysko <khospodary...@lohika.com>
Date:   2016-09-16T07:36:34Z

    Configured pom.xml to run only group "group" in order to show the issue.


> TestNG tests are run with group name that ends with specified group 
> --------------------------------------------------------------------
>                 Key: SUREFIRE-1278
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1278
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.19.1
>         Environment: OS X El Capitan 10.11.6
> TestNG 6.9.10
>            Reporter: Kostya Hospodarysko
>            Assignee: Tibor Digana
>         Attachments: testng-groups.zip
> h4.Preconditions:
> There is a simple TestNG class with two methods so that 1st method has group 
> "group" and 2nd has group "apigroup".
> h4.Steps to reproduce:
> Run tests with command:
> {noformat}
> mvn clean test -Dgroups=group
> {noformat}
> {color:red}h4.Actual:{color}
> Both tests are run.
> {color:green}h4.Expected:{color}
> Only method with group "group" is run.
> Demo project could be found here: 
> https://github.com/khospodarysko/testng-groups.
> Looks like the issue is in GroupMatcherMethodSelector as looking at 
> includeMethod it is seen that is always returns true.

This message was sent by Atlassian JIRA

Reply via email to