我正在寻找集成 Behat 和 BrowserStack。我设置了基本功能,但我想启用本地隧道。我已经下载了所需的 jar 来执行此操作。当我想设置“browserstack_tunnel”参数时,问题就来了。
在 MinkExtenstion/Services/Extention.php 中,我将以下键添加到 seliuem2 配置文件中。
booleanNode('browserstack-tunnel')->end()->
booleanNode('browserstack-debug')->end()->
这是我的 behat.yml :
default:
filters:
tags: "~@todo"
formatter:
name: pretty
parameters:
snippets: false
extensions:
SilverStripe\BehatExtension\MinkExtension:
# Adjust "base_url" to your own website URL.
# Can be set via environment variables or _ss_environment.php/$_FILE_TO_URL_MAPPING as well.
#
# base_url: http://localhost/
# TODO Dynamically set through LocatorProcessor
files_path: %behat.paths.base%/framework/tests/behat/features/files/
default_session: selenium2
javascript_session: selenium2
goutte: ~
selenium2:
browserstack:
extensions:
SilverStripe\BehatExtension\MinkExtension:
selenium2:
browser: firefox
# Add your own username and API token here
wd_host: http://<username>:<key>@hub.browserstack.com/wd/hub
browserstack-tunnel: true
SilverStripe\BehatExtension\Extension: ~