如何配置Bamboo来运行量角器测试用例

时间:2016-11-24 09:46:04

标签: javascript angularjs protractor bamboo

我是Bamboo CI工具的新手。我想在Bamboo中运行我的量角器测试用例,但我不知道要进行设置。

我的测试用例在本地运行良好,但我不知道如何在竹子中做conf。 我的conf看起来像这样: enter image description here

请查找我的日志错误:

bot@gerrit.it.here.com:29418/CommunityPlatform/testing/supplier-portal\nbamboo_capability_Agent_Name=Melocanna\nbamboo_capability_system_jdk_JDK_1_8=/usr/lib/jvm/java-8-oracle\nbamboo_capability_system_jdk_JDK_1_7=/usr/java/jdk1.7.0_75\n
build   24-Nov-2016 09:40:19    start testing
build   24-Nov-2016 09:40:20    [09:40:20] I/direct - Using ChromeDriver directly...
build   24-Nov-2016 09:40:20    [09:40:20] I/launcher - Running 1 instances of WebDriver
build   24-Nov-2016 09:40:20    [09:40:20] E/direct - Error code: 135
build   24-Nov-2016 09:40:20    [09:40:20] E/direct - Error message: Could not find chromedriver at /media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.25
build   24-Nov-2016 09:40:20    [09:40:20] E/direct - Error: Could not find chromedriver at /media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.25
build   24-Nov-2016 09:40:20        at Direct.getNewDriver (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/built/driverProviders/direct.js:65:27)
build   24-Nov-2016 09:40:20        at Runner.createBrowser (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/built/runner.js:190:43)
build   24-Nov-2016 09:40:20        at /media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/built/runner.js:264:30
build   24-Nov-2016 09:40:20        at _fulfilled (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:834:54)
build   24-Nov-2016 09:40:20        at self.promiseDispatch.done (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:863:30)
build   24-Nov-2016 09:40:20        at Promise.promise.promiseDispatch (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:796:13)
build   24-Nov-2016 09:40:20        at /media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:556:49
build   24-Nov-2016 09:40:20        at runSingle (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:137:13)
build   24-Nov-2016 09:40:20        at flush (/media/ephemeral0/c9ed21ed82cd/build-dir/RDMPDEV-SUP-JOB1/node_modules/protractor/node_modules/q/q.js:125:13)
build   24-Nov-2016 09:40:20        at nextTickCallbackWith0Args (node.js:436:9)
build   24-Nov-2016 09:40:20    [09:40:20] E/launcher - Process exited with error code 135
simple  24-Nov-2016 09:40:20    Failing task since return code of [/bin/sh /tmp/RDMPDEV-SUP-JOB1-76-ScriptBuildTask-8031634411667419963.sh] was 135 while expected 0
simple  24-Nov-2016 09:40:20    Finished task 'Run Protractor test' with result: Failed

如果有人可以帮助我,我将不胜感激。感谢

1 个答案:

答案 0 :(得分:2)

错误消息显示您需要安装webdriver来执行量角器测试。 node node_modules/protractor/bin/webdriver-manager update应将最新的webdriver安装到./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver<VERSION>。在protractor.conf文件中,将此路径设置为chromeDriver属性的值。

此外,对于无头竹节服务器,您可能需要启动virtual frame buffer并设置DISPLAY环境变量,以使您的浏览器能够在没有显示硬件的情况下呈现页面。 the answer to this question中有一个很好的解释。