当我在本地运行我的机器人测试时,一切都很好。我有一个非常基本的Scala Play项目,其中包含几个html页面。该项目使用bitbucket,使用Circle Ci构建,并使用Docker映像。我的 Dockerfile 看起来像这样...
FROM circleci/python:2.7-stretch-browsers
USER root
RUN pip install --upgrade pip && \
pip install --upgrade robotframework robotframework-httplibrary robotframework-seleniumlibrary requests robotframework-requests python-jose robotframework-jsonlibrary naked
这是我的.robot文件...
*** Settings ***
Documentation This is some basic info about the whole suite
Library SeleniumLibrary
*** Variables ***
*** Test Cases ***
User must login to visit landing page
[Documentation] This is some basic information about the test
[Tags] Smoke
Open Browser http://localhost:9000 headlesschrome
#Open Browser http://localhost:9000 chrome
Wait Until Page Contains The Login and Authentication App!
Sleep 2s
Click Link Continue
Wait Until Page Contains User Login
Sleep 1s
Input Text username geoff
Sleep 1s
Input Text password 123
Sleep 2s
Click Button Login
Sleep 2s
Wait Until Page Contains Landing Page!
Sleep 2s
Click Link logout
Wait Until Page Contains You are logged out.
Sleep 2s
Close Browser
*** Keywords ***
圆ci末端有2个步骤。 构建(包括3个单元测试)并运行机器人测试。构建正常,但是机器人测试失败。这是Circlci的输出...
==============================================================================
User must login to visit landing page :: This is some basic inform... .User must login to visit landing page :: This is some basic inform... | FAIL |
Text 'The Login and Authentication App!' did not appear in 5 seconds.
------------------------------------------------------------------------------
Amazon :: This is some basic info about the whole suite | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
Output: /root/project/output.xml
Log: /root/project/log.html
Report: /root/project/report.html
Exited with code 1
我怀疑CircleCi和headlesschrome存在一些问题。我尝试使用不同的Docker映像,该映像安装了很多Chrome东西,但说实话,这就像在黑暗中刺中一样。关于如何解决此问题的任何想法将不胜感激。