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

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

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment