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

Olivier Berger olberger at libremir.placard.fr.eu.org
Thu Feb 10 13:57:39 CET 2011


Author: olberger
Date: 2011-02-10 13:57:34 +0100 (Thu, 10 Feb 2011)
New Revision: 12212

Modified:
   branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php
Log:
It works ! ;-)

Modified: branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php
===================================================================
--- branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php	2011-02-10 12:56:57 UTC (rev 12211)
+++ branches/Branch_5_1/src/plugins/oslc/tests/func/sureFireReportTest.php	2011-02-10 12:57:34 UTC (rev 12212)
@@ -6,17 +6,25 @@
 // provider JUnit test suite by the Maven Surefire plugin to detect if
 // tests are passed as before (non-regression)
 
-class Example extends FForge_SeleniumTestCase
+class SureFireReports extends FForge_SeleniumTestCase
 {
-  protected function setUp()
-  {
-    $this->setBrowser("*chrome");
-    $this->setBrowserUrl("https://forge.local/plugins/oslc/surefire/surefire-report.html");
-  }
 
   // Test the ServiceProviderCatalogTests results
-  public function testServiceProviderCatalogTests()
+  public function testServiceProviderCatalogTestsResults()
   {
+
+    // 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";
+
+    // Check the results in the generated HTML report
     $this->open("/plugins/oslc/surefire/surefire-report.html");
     $this->click("link=net.openservices.provider.test.oslcv1tests");
 
@@ -25,7 +33,7 @@
     $this->assertEquals("ServiceProviderCatalogTests", $this->getText("//div[@id='contentBox']/div[3]/div/h3[contains(.,'net.openservices.provider.test.oslcv1tests')]/../table/tbody/tr[2]/td[2]"));
 
     // Tests
-    $this->assertEquals("42", $this->getText("//div[@id='contentBox']/div[3]/div/h3[contains(.,'net.openservices.provider.test.oslcv1tests')]/../table/tbody/tr[2]/td[3]"));
+    $this->assertEquals("56", $this->getText("//div[@id='contentBox']/div[3]/div/h3[contains(.,'net.openservices.provider.test.oslcv1tests')]/../table/tbody/tr[2]/td[3]"));
     // Errors
     $this->assertEquals("0", $this->getText("//div[@id='contentBox']/div[3]/div/h3[contains(.,'net.openservices.provider.test.oslcv1tests')]/../table/tbody/tr[2]/td[4]"));
     // Failures
@@ -34,4 +42,5 @@
     $this->assertEquals("0", $this->getText("//div[@id='contentBox']/div[3]/div/h3[contains(.,'net.openservices.provider.test.oslcv1tests')]/../table/tbody/tr[2]/td[6]"));
   }
 }
+
 ?>
\ No newline at end of file




More information about the Fusionforge-commits mailing list