[ http://jira.codehaus.org/browse/SUREFIRE-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter moved MSUREFIRE-20 to SUREFIRE-146: ------------------------------------------------ Affects Version/s: (was: 1.5.1 (2.1.1 plugin)) Fix Version/s: (was: 1.5.2 (2.1.2 plugin)) 1.5.2 (2.1.2 plugin) Complexity: (was: Intermediate) Key: SUREFIRE-146 (was: MSUREFIRE-20) Project: Maven Surefire (was: Maven 2.x Surefire Plugin) > forkMode=pertest fails to call setUp > ------------------------------------ > > Key: SUREFIRE-146 > URL: http://jira.codehaus.org/browse/SUREFIRE-146 > Project: Maven Surefire > Issue Type: Bug > Environment: Maven 2.0.1 running maven-surefire-plugin 2.1.1 > Reporter: Matt Brozowski > Assigned To: Carlos Sanchez > Priority: Blocker > Fix For: 1.5.2 (2.1.2 plugin) > > Attachments: surefire-sample.zip > > > The surefire plugin is failing to call the setUp method when > forkMode=pertest. I will attach a very simple test project that will make it > easy to verify this. Below is the 'trimmed' output if mvn -X > -DforkMode=pertest test for the sample project. I suspect that the tearDown > method is not getting called either but could not think of a simple way to > verify that case for a 'pertest' configuration. > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-surefire-plugin:2.1.1:test' --> > [DEBUG] (f) basedir = /Users/brozow/tmp/surefire-sample > [DEBUG] (f) childDelegation = true > [DEBUG] (f) classesDirectory = > /Users/brozow/tmp/surefire-sample/target/classes > [DEBUG] (f) classpathElements = > [/Users/brozow/tmp/surefire-sample/target/classes, > /Users/brozow/tmp/surefire-sample/target/test-classes, > /Users/brozow/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar] > [DEBUG] (f) forkMode = pertest > [DEBUG] (f) jvm = java > [DEBUG] (f) localRepository = [local] -> file:///Users/brozow/.m2/repository > [DEBUG] (f) pluginArtifacts = [junit:junit:jar:3.8.1, > org.apache.maven.surefire:surefire-booter:jar:1.5, > org.apache.maven.surefire:surefire:jar:1.5.1, > org.codehaus.plexus:plexus-utils:jar:1.0.4, > org.apache.maven:maven-plugin-api:jar:2.0, > org.apache.maven:maven-artifact:jar:2.0] > [DEBUG] (f) printSummary = true > [DEBUG] (f) reportFormat = brief > [DEBUG] (f) reportsDirectory = > /Users/brozow/tmp/surefire-sample/target/surefire-reports > [DEBUG] (f) testClassesDirectory = > /Users/brozow/tmp/surefire-sample/target/test-classes > [DEBUG] (f) useFile = true > [DEBUG] -- end configuration -- > [INFO] [surefire:test] > ------------------------------------------------------- > T E S T S > ------------------------------------------------------- > [surefire] Running com.example.SurefireTest > [surefire] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.051 sec > <<<<<<<< FAILURE !! > Results : > [surefire] Tests run: 1, Failures: 1, Errors: 0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira