Created
January 27, 2015 07:16
-
-
Save jverdeyen/1cc07b47950c245f5fd9 to your computer and use it in GitHub Desktop.
Robo: Starting WebDriver in Docker container, starting PHP server, running acceptance tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function testWebdriver($args = '', $opt = ['test|t' => null]) | |
{ | |
$test = $opt['test'] ? ':'.$opt['test'] : ''; | |
$container = $this->taskDockerRun('davert/selenium-env') | |
->detached() | |
->publish(4444,4444) | |
->env('APP_PORT', 8000) | |
->run(); | |
$this->taskServer(8000) | |
->dir('tests/data/app') | |
->background() | |
->host('0.0.0.0') | |
->run(); | |
sleep(3); // wait for selenium to launch | |
$this->taskCodecept('./codecept') | |
->test('tests/unit/Codeception/Module/WebDriverTest.php'.$test) | |
->args($args) | |
->run(); | |
$this->taskDockerStop($container)->run(); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment