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

Running single test in Failsafe using CLI does not override <includes> configuration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.12
    • 2.19
    • Maven Failsafe Plugin
    • None
    • Mac OS X 10.7, Maven 3.0.3, JDK 1.7.0_04-ea

    Description

      Description

      If a single test is specified from using CLI parameters, but the test does not match the <includes> pattern for failsafe, then the test will not run. This is different from the behavior for the surefire plugin, which will run any test specified using CLI parameters. If the test does match the <includes> pattern for failsafe, then it will run.

      Reproduction steps

      1. Create a project with a single test named "Sample.java".
      2. Add the following block to the failsafe configuration:
         
        <includes> 
          <include>**/Sample.java</include>
        </includes> 
        
      1. Run "mvn clean verify -Dit.test=Sample" from the command line (and verify that test runs).
      2. Remove the <includes> block shown above from the pom.
      3. Run "mvn clean verify -Dit.test=Sample" from the command line.

      Expected results

      Sample test is run, as before, and no other tests are run.

      Actual results

      No tests are run.

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              yurodivuie David Drake
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: