[Fusionforge-commits] r12851 - branches/Branch_5_1/src/plugins/oslc/tests/func

Alain Peyrat aljeux at fusionforge.org
Sat Mar 19 16:35:01 CET 2011


Author: aljeux
Date: 2011-03-19 16:35:01 +0100 (Sat, 19 Mar 2011)
New Revision: 12851

Modified:
   branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php
Log:
Skip oslc test if maven is not available.

Modified: branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php	2011-03-19 13:25:22 UTC (rev 12850)
+++ branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php	2011-03-19 15:35:01 UTC (rev 12851)
@@ -9,30 +9,34 @@
 class SureFireReports extends FForge_SeleniumTestCase
 {
 
-  // Test the ServiceProviderCatalogTests results
-  public function testServiceProviderCatalogTestsResults()
-  {
+	// Test the ServiceProviderCatalogTests results
+	public function testServiceProviderCatalogTestsResults()
+	{
+		system('mvn --version &>/dev/null', $retval);
+        if ($retval) {
+            $this->markTestSkipped('Maven (mvn) is not available.');
+        }
 
-    // Make sure there's a project with a tracker
-    $this->populateStandardTemplate('trackers');
-    $this->init();
+		// Make sure there's a project with a tracker
+		$this->populateStandardTemplate('trackers');
+		$this->init();
 
-    // start the OSLC test suite
-    echo "\nStarting OSLC test suite\n";
-    $directory = dirname(dirname(__FILE__));
-    echo "Executing " . $directory . "/run-provider-tests.sh\n";
-    system('cd ' . $directory . '; ./run-provider-tests.sh');
-    echo "OSLC test suite executed\n\n";
+		// start the OSLC test suite
+		echo "\nStarting OSLC test suite\n";
+		$directory = dirname(dirname(__FILE__));
+		echo "Executing " . $directory . "/run-provider-tests.sh\n";
+		system('cd ' . $directory . '; ./run-provider-tests.sh');
+		echo "OSLC test suite executed\n\n";
 
-    // Check the OSLC JUnit testsuite results in the generated HTML report
-    $this->open("/plugins/oslc/surefire/surefire-report.html");
-    $this->assertEquals("net.openservices.provider.test.oslcv2tests", $this->getTable("//div[@id='contentBox']/div[3]/table.1.0"));
-    $this->assertEquals("ServiceProviderCatalogXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.1.1"));
-    $this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.1.6"));
-    $this->assertEquals("ServiceProviderXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.3.1"));
-    $this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.3.6"));
-    $this->assertEquals("ServiceProviderCatalogRdfXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.4.1"));
-    $this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.4.6"));
-  }
+		// Check the OSLC JUnit testsuite results in the generated HTML report
+		$this->open("/plugins/oslc/surefire/surefire-report.html");
+		$this->assertEquals("net.openservices.provider.test.oslcv2tests", $this->getTable("//div[@id='contentBox']/div[3]/table.1.0"));
+		$this->assertEquals("ServiceProviderCatalogXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.1.1"));
+		$this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.1.6"));
+		$this->assertEquals("ServiceProviderXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.3.1"));
+		$this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.3.6"));
+		$this->assertEquals("ServiceProviderCatalogRdfXmlTests", $this->getTable("//div[@id='contentBox']/div[3]/div/table.4.1"));
+		$this->assertEquals("100%", $this->getTable("//div[@id='contentBox']/div[3]/div/table.4.6"));
+	}
 }
 ?>




More information about the Fusionforge-commits mailing list