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

时间:2021-09-29 05:11:02

I am new to Bamboo CI tool. I want to run my protractor test case in Bamboo but I dont know to do the setup.

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

My test case run fine locally but I dont know how to do the conf in bamboo. My conf looks like this : 如何配置Bamboo来运行量角器测试用例

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

Please find my log error :

请找我的日志错误:

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

I would be grateful if someone can help me out. Thanks

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

1 个解决方案

#1


2  

The error message show that you need to install a webdriver to perform protractor test. node node_modules/protractor/bin/webdriver-manager update should install the latest webdriver into ./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver<VERSION>. In your protractor.conf file set this path as value of the chromeDriver property.

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

Additionally, for a headless bamboo server you might need to start a virtual frame buffer and set a DISPLAY environment variable to enable your Browser to render the pages without display hardware. There is a good explanation in the answer to this question.

此外,对于无头竹节服务器,您可能需要启动虚拟帧缓冲区并设置DISPLAY环境变量,以使您的浏览器能够在没有显示硬件的情况下呈现页面。这个问题的答案有一个很好的解释。

#1


2  

The error message show that you need to install a webdriver to perform protractor test. node node_modules/protractor/bin/webdriver-manager update should install the latest webdriver into ./node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver<VERSION>. In your protractor.conf file set this path as value of the chromeDriver property.

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

Additionally, for a headless bamboo server you might need to start a virtual frame buffer and set a DISPLAY environment variable to enable your Browser to render the pages without display hardware. There is a good explanation in the answer to this question.

此外,对于无头竹节服务器,您可能需要启动虚拟帧缓冲区并设置DISPLAY环境变量,以使您的浏览器能够在没有显示硬件的情况下呈现页面。这个问题的答案有一个很好的解释。