Hello. I'm attempting to set-up some tests in Selenium RC that I can quickly specify which browsers I want to target, without having to copy/paste into each test.
Here is a sample test:
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
public static $browsers = array(
array(
'name' => 'Firefox on Windows',
'browser' => '*firefox',
'host' => 'localhost',
'port' => 4444,
'timeout' => 30000,
),
array(
'name' => 'IE7 on Windows XP',
'browser' => '*iexplore',
'host' => 'XPSTATION.DOMAIN.com',
'port' => 4444,
'timeout' => 30000,
),
array(
'name' => 'Safari on OSX',
'browser' => '*safari',
'host' => 'MAC.DOMAIN.com',
'port' => 4444,
'timeout' => 30000
),
);
.... tests go below
}
I have a ini parsing function I'd like to use to populate the $browsers
array, but I can't seem to determine how to pass my array into the $browsers
property effectively.
Can someone share their experiences setting up a solution that can specify which browsers to test on without specifying within each TestCase? Thanks in advance.