get browser args fropm config
This commit is contained in:
parent
52f1363745
commit
f9cb9aac4c
15
phpunit.xml
15
phpunit.xml
@ -1,13 +1,13 @@
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/6.3/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="vendor/autoload.php"
|
||||
verbose="true"
|
||||
>
|
||||
|
||||
<logging>
|
||||
<!--log type="coverage-html" target="report/report" lowUpperBound="35" highLowerBound="70"/>
|
||||
<log type="coverage-clover" target="report/coverage.xml"/>
|
||||
<log type="coverage-php" target="report/coverage.serialized"/>
|
||||
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/-->
|
||||
<log type="junit" target="report/logfile.xml"/>
|
||||
<log type="testdox-html" target="report/testdox.html"/>
|
||||
<log type="testdox-text" target="report/testdox.txt"/>
|
||||
@ -16,8 +16,15 @@
|
||||
<php>
|
||||
<env name="SeleniumBrowserUrl" value="https://example.com"/>
|
||||
<env name="SeleniumBrowser" value="firefox"/>
|
||||
<env name="SeleniumBrowserArgs" value="-headless"/>
|
||||
<env name="SeleniumWindowSize" value="1024,768"/>
|
||||
<env name="SeleniumScreenshotPath" value="/tmp/"/>
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="all">
|
||||
<directory>./tests/</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
</phpunit>
|
||||
|
@ -6,7 +6,9 @@ abstract class BrowserTest extends \PHPUnit_Extensions_Selenium2TestCase{
|
||||
public function setUp(){
|
||||
$this->setHost('localhost');
|
||||
$this->setPort(4444);
|
||||
$this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>['-headless','screenshot','window-size='.getenv('SeleniumWindowSize')]]]);
|
||||
$args=explode(',',getenv('SeleniumBrowserArgs'));
|
||||
$args[]='screenshot';
|
||||
$this->setDesiredCapabilities(['moz:firefoxOptions'=>['args'=>$args]]);
|
||||
$this->setBrowserUrl(getenv('SeleniumBrowserUrl'));
|
||||
$this->setBrowser(getenv('SeleniumBrowser'));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user