Let's say I have a test like this:
class SortTest extends PHPUnit_Extensions_Selenium2TestCase { public function setUp() { $this->setHost('192.168.1.1'); $this->setBrowserUrl('http://some.url/'); $this->setBrowser('chrome'); } public function testFoo() { $this->url('/foo'); } public function testBar() { $this->url('/bar'); } }
If I run this test, I will see that every time the root page loads, then the required /foo or /bar opens.
If I comment or redirect the setBrowserUrl() call to the test method, I get an Undefined index: browserUrl
So, is there a way to avoid redundant HTTP request in the testing method?
source share