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

Executing selected (multiple) tests of same class gives Exception

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.18.1
    • Fix Version/s: 2.19
    • Component/s: Maven Surefire Plugin
    • Labels:
      None
    • Environment:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: