Tag: 无头

selenium镀铬在jenkins奴隶崩溃

我试图在无头模式下使用selenium运行UItesting。 我看到铬是浏览器崩溃,每当我尝试加载驱动程序。 这是追溯。 Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/behave/model.py", line 1456, in run match.run(runner.context) File "/usr/local/lib/python3.5/dist-packages/behave/model.py", line 1903, in run self.func(context, *args, **kwargs) File "steps/collectorUi.py", line 35, in step_impl assert context.ndpUt.driverInit(title="Pegasus Portal") is not False, 'Initial page title didnt match' File "../collectorSanity/libs/ndpUi.py", line 91, in driverInit browser=self.browser) File "../runner/testutils/seleniumutils.py", line 70, in __init__ executable_path=self.browserPath+self.browserDriver) […]

我想在夜间运行testing,但是当我dockerize我的应用程序,我无法运行testing?

我想dockerize我的夜间应用程序,它应该运行无头。 我的守夜是在节点模块内,我的testing使用下面的命令运行xvfb-run –server-args =' – screen 0 1600x1200x24'./node_modules/.bin/nightwatch。 现在我想dockerize它,所以通过以下步骤: 我添加了tildedave / docker-nightwatch-xvfb的Dockerfile https://github.com/tildedave/docker-nightwatch-xvfb/tree/master/chrome 。 我使用docker build -tt构build项目。 build设取得成功 然后我试图通过使用docker容器运行它运行此testing不运行。 我试过的方法 1.我的Dockerfile里面添加了RUN xvfb-run –server-args =' – screen 0 1600x1200x24'./node_modules/.bin/nightwatch。 我在构build映像时看到以下错误: RUN xvfb-run –server-args='-screen 0 1600x1200x24' ./node_modules/.bin/nightwatch. WORKDIR <my working directory location> 错误 —> Running in a9b0bf815180 /usr/bin/xvfb-run: 183: /usr/bin/xvfb-run: ./node_modules/.bin/nightwatch: not found. 2.我试过CMD“xvfb-run –server-args =' – […]

java.library.path中没有fontmanager

以下代码在我的桌面上工作得很好: BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics g = image.getGraphics(); g.setFont(new Font("SansSerif", Font.BOLD, 18)); Graphics2D graphics = (Graphics2D) g; graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); graphics.drawString(s, 5, 20); 但是,当我在我的服务器上运行这个代码(在Docker容器内的Linux上运行的openjdk)时,会失败,并显示以下错误: java.lang.UnsatisfiedLinkError: no fontmanager in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61) at java.security.AccessController.doPrivileged(Native Method) at sun.font.FontManagerNativeLibrary.<clinit>(FontManagerNativeLibrary.java:32) at sun.font.SunFontManager$1.run(SunFontManager.java:339) at java.security.AccessController.doPrivileged(Native Method) at sun.font.SunFontManager.<clinit>(SunFontManager.java:335) at java.lang.Class.forName0(Native Method) […]

在Docker容器中无头无虑地运行Xvfb和Firefox的摩卡testing时出错

我目前正在运行一个Ubuntu的图像的docker容器。 这些是我用来安装Xvfb,firefox和Nodejs的一系列命令: apt-get update apt-get install -y xorg xvfb firefox dbus-x11 xfonts-100dpi xfonts-75dpi xfonts-cyrillic apt-get install -y python gcc make g++ wget wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz tar -zxvf node-v4.0.0-rc.1.tar.gz cd node-v4.0.0-rc.1 ./configure make install 在安装并确保Node,npm和Xvfb正在工作之后,我试着在firefox上运行一些我的testing。 这里是我用来运行Xvfb和我的testing脚本(我写了一个npm脚本,调用摩卡和适当的testing)的命令: xvfb-run npm run l-2361:spec 这是我的输出: > ui-tests@1.0.0 l-2361:spec /go/src/bitbucket.org/companyName/platform/qe > npm run env-local mocha test/admin/dashboard/adminUser/pdvi-2361.js — –reporter spec –slow 0 > […]

奇怪的错误使用量angular器无头像时

我得到这个错误: $ docker run -it –privileged –rm –net=host -v /dev/shm:/dev/shm -v $(pwd):/protractor webnicer/protractor-headless src/test/e2e/config/local-config.js [20:21:32] I/local – Starting selenium standalone server… [20:21:32] I/launcher – Running 1 instances of WebDriver [20:21:35] I/local – Selenium standalone server started at http://192.168.65.2:47981/wd/hub [20:22:00] E/launcher – null [20:22:00] E/launcher – WebDriverError: null at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5) at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:639:15) at parseHttpResponse […]

将xserver添加到Docker容器(主机是无头的)

我正在构build一个有Maven和一些依赖关系的Docker容器。 然后在容器中执行一个脚本。 看来,其中一个依赖关系需要一个Xserver的工作。 没有任何东西显示在屏幕上,但似乎有必要,无法避免。 我得到它在Dockerfile上放置一个ENV DISPLAY=xxxx:0 ,它连接到外部Xserver,它的工作原理。 但关键是要制造一个Docker自给自足的容器。 所以我需要添加一个Xserver到我的容器中添加必要的Dockerfile。 我希望Xserver只能由Docker容器本身访问,而不能在外部访问。 我的Dockerfile的FROM ubuntu:15.04是FROM ubuntu:15.04 ,这是不可改变的,因为我的Dockerfile有很多东西取决于特定的版本。 我已经阅读了一些关于如何从Docker容器连接到Docker主机的Xserver的post,像这样 。 但是,由于我提出问题的标题,Docker主机是无头的,没有Xserver。 这将是最小的apt-get包安装到容器有一个Xserver? 我想在我的Dockerfile将需要显示环境var像ENV DISPLAY=:0 。 它是否正确? 是否需要在docker run命令中添加其他内容? 谢谢。

量angular器e2e使用bitbucketstream水线进行testing

我已经完成了所有的e2etesting,并且能够在本地机器和Codeship上成功运行。 我想将我们的CI从编码转移到Bitbucketstream水线。 所以我创build了自己的testing环境的Docker镜像。 当我在本地工作区中运行docker conatiner时,testing工作正常,但是当构build在bitbucketpipe道中运行时,所有testing都会因超时而失败,说明在页面上找不到angular度。 服务器肯定是运行在容器anttesting也开始,但问题是页面打开。 有没有人有任何想法呢? 如果需要任何代码,我会发布一切需要的。

无头量angular器不分片testing

我试图运行我的testing无头和碎片两个我的testing套件并行运行它们。 在我的本地机器上,它们并行运行,但在这个无头的设置中,它们依次运行。 我正在使用networking驱动程序和量angular器的docker图像。 我正在使用webnicer-protractordocker图像: https ://hub.docker.com/r/webnicer/protractor-headless/和使用elgalu / selenium的networking驱动程序。 我运行的conf.js如下所示: exports.config = { //Headless //seleniumAddress: 'http://localhost:4444/wd/hub', seleniumAddress: 'http://localhost:24444/wd/hub', capabilities: { browserName: 'chrome', shardTestFiles: true, maxInstances: 2 }, specs: ['Suites/AccountSettingsSuite.js', 'Suites/CloneDashboardSuite.js'] }

XDummy在Docker容器中

我正在尝试通过使用XDummy驱动程序在Docker容器中运行X11服务器。 但是,我有问题得到它的工作。 预期的目的是执行无头渲染。 我可以使用Xvfb工作,但是我需要RANDR支持,并且最终还需要GL支持。 Dockerfile: FROM node:slim RUN mkdir nodeapp \ && apt-get update \ && apt-get install -y xorg \ && apt-get install -y xserver-xorg-video-dummy x11-apps COPY App /nodeapp/ ENV DISPLAY :1 RUN cd nodeapp/ \ && npm install \ && Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile /nodeapp/xdummy.log -config /nodeapp/xorg.conf start […]

Docker中使用Xvfb的无头Chrome

我正在尝试使用Xvfb在Docker容器中运行Chrome headless 。 但是,虽然ps显示Chrome进程存在,但它没有到达我的testing网站。 在Docker外部运行相同的命令是成功的。 Xvfb :0 -screen 0 1024x768x24 & DISPLAY=:0 google-chrome http://mytestpage.com 在Docker中 ,我收到以下消息/错误: Xlib: extension "RANDR" missing on display ":0". Xlib: extension "RANDR" missing on display ":0". [1180:1180:1120/051319:ERROR:desktop_window_tree_host_x11.cc(882)] Not implemented reached in virtual void views::DesktopWindowTreeHostX11::InitModalType(ui::ModalType) [1223:1223:1120/051319:ERROR:sandbox_linux.cc(338)] InitializeSandbox() called with multiple threads in process gpu-process [1180:1201:1120/051319:ERROR:browser_gpu_channel_host_factory.cc(144)] Failed to create channel. 而 ps au […]