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

Executing selected (multiple) tests of same class gives Exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.18.1
    • 2.19
    • Maven Surefire Plugin
    • None
    • Java 8, Linux

    Description

      testing selected methods (more than 1) of the same class using the syntax

      mvn -Dtest=MyClass#method1+method2 test

      Gives:
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1948)
      at org.apache.maven.surefire.junit4.JUnit4Provider.getMethod(JUnit4Provider.java:307)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:147)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              dusty Alessandro Polverini
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: