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

Classes located in src/test/java are treated as JUnit tests if they contain the name Test

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.4.3
    • None
    • None
    • None
    • Ubuntu

    Description

      Having recently upgradet to 2.4.3 I realise that all classes whose name conforms to the above described pattern are being treated as JUnit test classes, meaning that if the class isnt scoped public, it does not provide a default construct and it does not contain a test method, it will be reported as containing failed tests, i.e.:

      Tests in error:
      initializationError0(com.mycompany...TestMethodConfiguration)
      initializationError1(com.mycompany...TestMethodConfiguration)
      Tests run: 246, Failures: 0, Errors: 2, Skipped: 0

      The methods initializationError0 and 1 do not exist in the class obviously.

      Surefire didn't use to treat classes based on naming conventions unless the class name ended with "Test".

      Attachments

        Issue Links

          Activity

            People

              carlos Carlos Sanchez Gonzalez
              kristoffer79 Kristoffer Moum
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: