You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2006/01/02 17:09:22 UTC
svn commit: r365369 - in /maven/plugins/trunk/maven-surefire-plugin/src/it:
./ test1/ test1/pom.xml test1/src/ test1/src/test/ test1/src/test/java/
test1/src/test/java/SurefireTest.java
Author: carlos
Date: Mon Jan 2 08:09:15 2006
New Revision: 365369
URL: http://svn.apache.org/viewcvs?rev=365369&view=rev
Log:
Added integration test
PR: MSUREFIRE-20
Added:
maven/plugins/trunk/maven-surefire-plugin/src/it/
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml (with props)
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/
maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java (with props)
Added: maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml?rev=365369&view=auto
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml (added)
+++ maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml Mon Jan 2 08:09:15 2006
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.surefire</groupId>
+ <artifactId>test1</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <name>Test for MSUREFIRE-20</name>
+ <description>forkMode=pertest fails to call setUp</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>pertest</forkMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Propchange: maven/plugins/trunk/maven-surefire-plugin/src/it/test1/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java
URL: http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java?rev=365369&view=auto
==============================================================================
--- maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java (added)
+++ maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java Mon Jan 2 08:09:15 2006
@@ -0,0 +1,19 @@
+import junit.framework.TestCase;
+
+public class SurefireTest extends TestCase {
+
+ private boolean setupCalled = false;
+
+ protected void setUp() {
+ setupCalled = true;
+ }
+
+ protected void tearDown() {
+ // is there a way to tests to see if tearDown was called?
+ }
+
+ public void testSetup() {
+ assertTrue("Setup was not called", setupCalled);
+ }
+
+}
Propchange: maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-surefire-plugin/src/it/test1/src/test/java/SurefireTest.java
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
RE: svn commit: r365369 - in /maven/plugins/trunk/maven-surefire-plugin/src/it: ./ test1/ test1/pom.xml test1/src/ test1/src/test/ test1/src/test/java/ test1/src/test/java/SurefireTest.java
Posted by Vincent Massol <vm...@pivolis.com>.
Hi Carlos,
> -----Original Message-----
> From: carlos@apache.org [mailto:carlos@apache.org]
> Sent: lundi 2 janvier 2006 17:09
> To: commits@maven.apache.org
> Subject: svn commit: r365369 - in /maven/plugins/trunk/maven-surefire-
> plugin/src/it: ./ test1/ test1/pom.xml test1/src/ test1/src/test/
> test1/src/test/java/ test1/src/test/java/SurefireTest.java
>
> Author: carlos
> Date: Mon Jan 2 08:09:15 2006
> New Revision: 365369
>
> URL: http://svn.apache.org/viewcvs?rev=365369&view=rev
> Log:
> Added integration test
> PR: MSUREFIRE-20
[snip]
> +public class SurefireTest extends TestCase {
> +
> + private boolean setupCalled = false;
> +
> + protected void setUp() {
> + setupCalled = true;
> + }
> +
> + protected void tearDown() {
> + // is there a way to tests to see if tearDown was called?
> + }
> +
> + public void testSetup() {
> + assertTrue("Setup was not called", setupCalled);
> + }
> +
> +}
Maybe you should add the following:
public SurefireTest (String name, String extraName)
{
super(name);
}
public static Test suite()
{
TestSuite suite = new TestSuite();
suite.addTest(new SurefireTest("testSetup", "dummy");
return suite;
}
This would also validate that surefire supports JUnit test suites (note the
custom onstructor which is important).
This would validate http://jira.codehaus.org/browse/MSUREFIRE-13 (which has
been closed but it didn't fix the suite problem I had).
Thanks
-Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org