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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.19.1
    • 2.20
    • Maven Surefire Plugin
    • None
    • 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

              tibordigana Tibor Digana
              khospodarysko Kostya Hospodarysko
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: