summaryrefslogtreecommitdiff
path: root/tests/test_tools
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-02-24 23:39:28 +0100
committerFabio Bas <ctrlaltca@gmail.com>2014-02-24 23:39:28 +0100
commitb340ed9cc57f327785ebc0c1b8fb725ffb02d647 (patch)
tree6166984b15b053469f78f9f532e3979c266d8b19 /tests/test_tools
parentd685027d525b91a5495ac7d207d1f04cda9625e0 (diff)
Cross-browser tests
Diffstat (limited to 'tests/test_tools')
-rw-r--r--tests/test_tools/PradoGenericSelenium2Test.php36
-rw-r--r--tests/test_tools/PradoGenericSeleniumTest.php37
2 files changed, 66 insertions, 7 deletions
diff --git a/tests/test_tools/PradoGenericSelenium2Test.php b/tests/test_tools/PradoGenericSelenium2Test.php
index d6cac6d1..b56fd9c8 100644
--- a/tests/test_tools/PradoGenericSelenium2Test.php
+++ b/tests/test_tools/PradoGenericSelenium2Test.php
@@ -4,14 +4,44 @@ require_once 'PHPUnit/Extensions/Selenium2TestCase.php';
// TODO: stub
class PradoGenericSelenium2Test extends PHPUnit_Extensions_Selenium2TestCase
{
- static $browser='firefox';
- static $baseurl='http://127.0.0.1/prado-master/tests/FunctionalTests/';
+ public static $browsers = array(
+ /*
+ array(
+ 'name' => 'Firefox on OSX',
+ 'browser' => '*firefox',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ 'timeout' => 30000,
+ ),
+ array(
+ 'name' => 'Chrome on OSX',
+ 'browser' => '*chrome',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ 'timeout' => 30000,
+ ),
+ array(
+ 'name' => 'Internet Explorer 11 on Windows8.1',
+ 'browser' => '*iexplore',
+ 'host' => '192.168.253.39',
+ 'port' => 4444,
+ ),
+ */
+ array(
+ 'name' => 'Internet Explorer 8 on WindowsXP',
+ 'browserName' => '*iehta',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ )
+ );
+
+ static $baseurl='http://10.0.2.2/prado-master/tests/FunctionalTests/';
+
static $timeout=5; //seconds
static $wait=1000; //msecs
protected function setUp()
{
- $this->setBrowser(static::$browser);
$this->setBrowserUrl(static::$baseurl);
$this->setSeleniumServerRequestsTimeout(static::$timeout);
}
diff --git a/tests/test_tools/PradoGenericSeleniumTest.php b/tests/test_tools/PradoGenericSeleniumTest.php
index 48702387..66502210 100644
--- a/tests/test_tools/PradoGenericSeleniumTest.php
+++ b/tests/test_tools/PradoGenericSeleniumTest.php
@@ -3,13 +3,42 @@ require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class PradoGenericSeleniumTest extends PHPUnit_Extensions_SeleniumTestCase
{
- static $browser='*firefox';
- static $baseurl='http://127.0.0.1/prado-master/tests/FunctionalTests/';
+ public static $browsers = array(
+ /*
+ array(
+ 'name' => 'Firefox on OSX',
+ 'browser' => '*firefox',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ 'timeout' => 30000,
+ ),
+ array(
+ 'name' => 'Chrome on OSX',
+ 'browser' => '*chrome',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ 'timeout' => 30000,
+ ),
+ array(
+ 'name' => 'Internet Explorer 11 on Windows8.1',
+ 'browser' => '*iexplore',
+ 'host' => '192.168.253.39',
+ 'port' => 4444,
+ ),
+ */
+ array(
+ 'name' => 'Internet Explorer 8 on WindowsXP',
+ 'browser' => '*iehta',
+ 'host' => '127.0.0.1',
+ 'port' => 4444,
+ )
+ );
+
+ static $baseurl='http://10.0.2.2/prado-master/tests/FunctionalTests/';
protected function setUp()
{
- $this->shareSession(true);
- $this->setBrowser(static::$browser);
+// $this->shareSession(true);
$this->setBrowserUrl(static::$baseurl);
}