简体   繁体   English

如何自动化Angularjs量角器测试?

[英]How can I automate Angularjs Protractor tests?

I've been trying to automate my Protractor tests for a couple weeks, and I've had many problems. 我一直在尝试自动进行量角器测试几个星期,但是我遇到了很多问题。 First I tried running them through Jenkins, which is installed on an Amazon Linux AMI instance. 首先,我尝试通过安装在Amazon Linux AMI实例上的Jenkins运行它们。 That didn't work, because I couldn't properly install Firefox or Chrome, and I couldn't get PhantomJS to run my tests correctly. 那没有用,因为我无法正确安装Firefox或Chrome,也无法让PhantomJS正确运行测试。

Next I tried using SSH commands to get Jenkins to run the Protractor tests on a separate Ubuntu Server instance. 接下来,我尝试使用SSH命令让Jenkins在单独的Ubuntu Server实例上运行Protractor测试。 Whenever I try to run Firefox or Chrome in there with Xvfb, it gets stuck on the step Initializing built-in extension GLX . 每当我尝试使用Xvfb在其中运行Firefox或Chrome时,它都会停留在Initializing built-in extension GLX的步骤Initializing built-in extension GLX I also get the error (process:7476): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed when trying to run Firefox. 我也收到错误消息(process:7476): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed在尝试运行Firefox时(process:7476): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

Any ideas that could point me in the right direction? 有什么想法可以指出正确的方向吗? I basically need to get Firefox or Chrome to run properly on either Amazon Linux AMI or Ubuntu Server 14.04. 我基本上需要让Firefox或Chrome才能在Amazon Linux AMI或Ubuntu Server 14.04上正常运行。

I use a headless selenium server in the cloud, it provides Chrome & Firefox even though there is no real DISPLAY. 我在云中使用无头硒服务器,即使没有真正的DISPLAY,它也可以提供Chrome和Firefox。 I've just moved the config files here: https://github.com/elgalu/headless 我刚刚将配置文件移到了这里: https : //github.com/elgalu/headless

Works ok with Ubuntu Server 14.04. 可以在Ubuntu Server 14.04上正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM