Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-1278

TestNG tests are run with group name that ends with specified group

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.19.1
    • Fix Version/s: 2.20
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Environment:
      OS X El Capitan 10.11.6
      TestNG 6.9.10

      Description

      Preconditions:

      There is a simple TestNG class with two methods so that 1st method has group "group" and 2nd has group "apigroup".

      Steps to reproduce:

      Run tests with command:

      mvn clean test -Dgroups=group
      

      h4.Actual:
      Both tests are run.

      h4.Expected:
      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.

        Attachments

        1. testng-groups.zip
          16 kB
          Kostya Hospodarysko

          Issue Links

            Activity

              People

              • Assignee:
                tibor17 Tibor Digana
                Reporter:
                khospodarysko Kostya Hospodarysko
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: