Laravel Dusk Tests& Bitbucket管道

时间:2018-06-18 09:48:20

标签: curl bitbucket-pipelines laravel-dusk

我正在尝试进行一些laravel黄昏测试,同时作为我的bitbucket管道的一部分。我收到以下错误:

E                            38 / 38 (100%)Invitation Code is: FktOXSfApm4J0glD28znPtUYK
Time: 1.45 minutes, Memory: 24.00MB
There were 38 errors:
1) Tests\Browser\NewUserRegisterTest::testInvitationIsRequired
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["--disable-gpu","--headless"]}}}
Failed to connect to localhost port 9515: Connection refused
/opt/atlassian/pipelines/agent/build/vendor/facebook/webdriver/lib/Remote/HttpCommandExecutor.php:292
/opt/atlassian/pipelines/agent/build/vendor/facebook/webdriver/lib/Remote/RemoteWebDriver.php:126
/opt/atlassian/pipelines/agent/build/tests/DuskTestCase.php:45
/opt/atlassian/pipelines/agent/build/tests/DuskTestCase.php:32
/opt/atlassian/pipelines/agent/build/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:189
/opt/atlassian/pipelines/agent/build/vendor/laravel/framework/src/Illuminate/Support/helpers.php:768
/opt/atlassian/pipelines/agent/build/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:190
/opt/atlassian/pipelines/agent/build/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:92
/opt/atlassian/pipelines/agent/build/vendor/laravel/dusk/src/Concerns/ProvidesBrowser.php:64
/opt/atlassian/pipelines/agent/build/tests/Browser/NewUserRegisterTest.php:40

所有测试都失败并出现相同的错误。我被困住了,不知道该怎么办。

1 个答案:

答案 0 :(得分:0)

在Laravel Dusk测试用例文件中,测试将在IP 9515上运行。但是由于管道在其自己的本地区域上运行,因此它不使用9515。这就是为什么会出现错误的原因。我建议您在本地运行Laravel Dusk测试。管道无法正常工作,因为您不断收到错误。