maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r596907 - /maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
Date Wed, 21 Nov 2007 02:27:07 GMT
Author: dfabulich
Date: Tue Nov 20 18:27:07 2007
New Revision: 596907

URL: http://svn.apache.org/viewvc?rev=596907&view=rev
Log:
[SUREFIRE-112] Adding surefire report test.  Right now we just assert that the report got
created and that we got an error free log.

Added:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java?rev=596907&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
(added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgReportTest.java
Tue Nov 20 18:27:07 2007
@@ -0,0 +1,34 @@
+package org.apache.maven.surefire.its;
+
+import java.io.File;
+
+import junit.framework.Assert;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test surefire-report on TestNG test
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class TestNgReportTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testDefaultConfiguration ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/testng-simple"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "surefire-report:report" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+        File reportHtml = new File(testDir, "target/site/surefire-report.html");
+        Assert.assertTrue( "surefire-report is missing", reportHtml.exists() );
+    }
+}



Mime
View raw message