运行 单个 Python Bamboo 上的 Selenium 测试 CI
Running single Python Selenium test on Bamboo CI
我有一个专用服务器,我们仅将其用于 Selenium (Python) 测试。
所以我想在该服务器中使用 SSH 和 运行 单个 Python Selenium 测试。我在另一台服务器上安装了 Bamboo 运行ning。是否可以通过 Bamboo SSH 作业?
这是我的 Bamboo SSH 任务脚本:
cd ~
cd tms2_selenium
source venv/bin/activate
behave features/login.feature
我得到这个错误:
Exception WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
build 07-Jul-2017 17:17:41 (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 3.16.0-4-amd64 x86_64)
Chrome failed to start: exited abnormally
打开chromedriver前打开显示:
context.display = Display(visible=0, size=(800, 600))
context.display.start()
options.add_argument('--no-sandbox')
context.browser = webdriver.Chrome('/usr/local/bin/chromedriver',chrome_options=options)
我有一个专用服务器,我们仅将其用于 Selenium (Python) 测试。
所以我想在该服务器中使用 SSH 和 运行 单个 Python Selenium 测试。我在另一台服务器上安装了 Bamboo 运行ning。是否可以通过 Bamboo SSH 作业?
这是我的 Bamboo SSH 任务脚本:
cd ~
cd tms2_selenium
source venv/bin/activate
behave features/login.feature
我得到这个错误:
Exception WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
build 07-Jul-2017 17:17:41 (Driver info: chromedriver=2.26.436382 (70eb799287ce4c2208441fc057053a5b07ceabac),platform=Linux 3.16.0-4-amd64 x86_64)
Chrome failed to start: exited abnormally
打开chromedriver前打开显示:
context.display = Display(visible=0, size=(800, 600))
context.display.start()
options.add_argument('--no-sandbox')
context.browser = webdriver.Chrome('/usr/local/bin/chromedriver',chrome_options=options)