I have the following Selenium test script:
=================
<?php
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class Login extends PHPUnit_Extensions_SeleniumTestCase\\ {\\ function setUp()\\ {\\ $this->setBrowser("*iexplore");\\ $this->setBrowserUrl("
http://someurl.com);\\ }
function testLogin()\\ {\\ $this->open("/");\\ $this->click("//strong");\\ $this->waitForPageToLoad("30000");\\ $this->assertTrue($this->isTextPresent("Email"));\\ $this->assertTrue($this->isTextPresent("Password"));\\ $this->type("p_Email", "
th...@notemine.com");\\ $this->type("p_Password", "somepass");\\ $this->click("//input[@value=' Login ']");\\ $this->waitForPageToLoad("30000");\\ $this->assertTrue($this->isTextPresent("Create a Landing Page"));\\ }\\ \\ \\ \\ }\\ ?>
=================
I would like to test multiple URLs for the same script. For example, this test (and associated tests) are executed for one domain, shows results, then the next domain is picked out from an array of domain names, and the test runs for that domain and gives the results.
Can someone provide me with a list of things I need to do to accomplish this? I looked into the TestSuite class in PHPUnit, but the documentation didn't seem clear enough for me. Note that I have $this->setBrowserUrl("
http://someurl.com), but ideally I'd like it to be $this->setBrowserUrl($url), but I can't pass parameters into setup(); doing setup($url) does not work.