我正试着用量角器(通过grunt)在Travis-CI上运行。当我在本地运行测试时,我的测试成功运行,但是我在Travis-CI上不断遇到以下错误。提前道谢。
下面是我的完整项目,以备需要其他文件时使用:https://github.com/crobby/oshinko-console/tree/travis-integration
$grunt测试-集成--baseURL=https:/${IP}
正在运行“量角器:默认”(量角器)任务
[launcher]正在运行%1个WebDriver实例
Selenium独立服务器启动于http://10.10.20.130:40443/wd/hub
错误-无法启动WebDriver会话。
我的.travis.yml文件看起来像
sudo: required
## use node_js
language: node_js
node_js:
- "6"
## home folder is /home/travis/build/radanalyticsio/oshinko-console
services:
- docker
before_install:
## add insecure-registry and restart docker
- pwd
- sudo cat /etc/default/docker
- sudo service docker stop
- sudo sed -i -e 's/sock/sock --insecure-registry 172.30.0.0\/16/' /etc/default/docker
- sudo cat /etc/default/docker
- sudo service docker start
- sudo service docker status
## chmod needs sudo, so all other commands are with sudo
- sudo mkdir -p /home/travis/origin
- sudo chmod -R 766 /home/travis/origin
## download oc 1.5.1 binary
- sudo wget https://github.com/openshift/origin/releases/download/v1.5.1/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit.tar.gz -P /home/travis/origin
- sudo ls -l /home/travis/origin
- sudo tar -C /home/travis/origin -xvzf /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit.tar.gz
- sudo ls -l /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit
- sudo cp /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit/oc /home/travis/origin
- sudo chmod -R 766 /home/travis/origin
- sudo ls -l /home/travis/origin
- sudo chmod -R +755 /home/travis/origin/*
- sudo cp /home/travis/origin/oc /bin
- sudo ls -l /bin
- oc version
- export PATH=$PATH:/home/travis/origin/
- echo $PATH
## below cmd is important to get oc working in ubuntu
- sudo docker run -v /:/rootfs -ti --rm --entrypoint=/bin/bash --privileged openshift/origin:v1.5.1 -c "mv /rootfs/bin/findmnt /rootfs/bin/findmnt.backup"
- oc cluster up --host-config-dir=/home/travis/origin
- sudo ls -l /home/travis/origin
- oc cluster down
## get the latest release code
- sudo cp dist/scripts/templates.js /home/travis/origin/master
- sudo cp dist/scripts/scripts.js /home/travis/origin/master
- sudo cp dist/styles/oshinko.css /home/travis/origin/master
- sudo chmod -R 766 /home/travis/origin/master
- sudo ls -l /home/travis/origin/master
## add changes to master-config.yaml
- "sudo sed -i -e \"s/extensionScripts: null/extensionScripts:\\n - templates.js\\n - scripts.js/\" /home/travis/origin/master/master-config.yaml"
- "sudo sed -i -e \"s/extensionStylesheets: null/extensionStylesheets:\\n - oshinko.css/\" /home/travis/origin/master/master-config.yaml"
- sudo cat /home/travis/origin/master/master-config.yaml
## oc cluster up
- oc cluster up --host-config-dir=/home/travis/origin --use-existing-config=true
## find IP:PORT of openshift
- IPSTR=`oc status |grep server`
- echo $IPSTR
- IP=${IPSTR##*/}
- echo ${IP}
install:
- npm install grunt-cli -g
- npm install
- npm install -g protractor
- node_modules/protractor/bin/webdriver-manager update
- node_modules/protractor/bin/webdriver-manager status
- cat node_modules/protractor/config.json
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- echo ${IP}
## integration tests need headless setup
- grunt test-integration --baseUrl=https://${IP}
notifications:
email:
on_success: never
on_failure: never
看来我需要使用一个较旧的firefox来与我正在使用的其他比特兼容。
正在工作。特拉维斯。伊梅尔在下面。
sudo: required
## use node_js
language: node_js
node_js:
- "6"
addons:
firefox: "46.0"
## home folder is /home/travis/build/radanalyticsio/oshinko-console
services:
- docker
before_install:
## add insecure-registry and restart docker
- pwd
- sudo cat /etc/default/docker
- sudo service docker stop
- sudo sed -i -e 's/sock/sock --insecure-registry 172.30.0.0\/16/' /etc/default/docker
- sudo cat /etc/default/docker
- sudo service docker start
- sudo service docker status
## chmod needs sudo, so all other commands are with sudo
- sudo mkdir -p /home/travis/origin
- sudo chmod -R 766 /home/travis/origin
## download oc 1.5.1 binary
- sudo wget https://github.com/openshift/origin/releases/download/v1.5.1/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit.tar.gz -P /home/travis/origin
- sudo ls -l /home/travis/origin
- sudo tar -C /home/travis/origin -xvzf /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit.tar.gz
- sudo ls -l /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit
- sudo cp /home/travis/origin/openshift-origin-client-tools-v1.5.1-7b451fc-linux-64bit/oc /home/travis/origin
- sudo chmod -R 766 /home/travis/origin
- sudo ls -l /home/travis/origin
- sudo chmod -R +755 /home/travis/origin/*
- sudo cp /home/travis/origin/oc /bin
- sudo ls -l /bin
- oc version
- export PATH=$PATH:/home/travis/origin/
- echo $PATH
## below cmd is important to get oc working in ubuntu
- sudo docker run -v /:/rootfs -ti --rm --entrypoint=/bin/bash --privileged openshift/origin:v1.5.1 -c "mv /rootfs/bin/findmnt /rootfs/bin/findmnt.backup"
- oc cluster up --host-config-dir=/home/travis/origin
- sudo ls -l /home/travis/origin
- oc cluster down
## get the latest release code
- sudo cp dist/scripts/templates.js /home/travis/origin/master
- sudo cp dist/scripts/scripts.js /home/travis/origin/master
- sudo cp dist/styles/oshinko.css /home/travis/origin/master
- sudo chmod -R 766 /home/travis/origin/master
- sudo ls -l /home/travis/origin/master
## add changes to master-config.yaml
- "sudo sed -i -e \"s/extensionScripts: null/extensionScripts:\\n - templates.js\\n - scripts.js/\" /home/travis/origin/master/master-config.yaml"
- "sudo sed -i -e \"s/extensionStylesheets: null/extensionStylesheets:\\n - oshinko.css/\" /home/travis/origin/master/master-config.yaml"
- sudo cat /home/travis/origin/master/master-config.yaml
## oc cluster up
- oc cluster up --host-config-dir=/home/travis/origin --use-existing-config=true
## find IP:PORT of openshift
- IPSTR=`oc status |grep server`
- echo $IPSTR
- IP=${IPSTR##*/}
- echo ${IP}
install:
- npm install grunt-cli -g
- npm install
- npm install grunt-protractor-runner@1.2.1
- ./node_modules/grunt-protractor-runner/scripts/webdriver-manager-update
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- echo ${IP}
## integration tests need headless setup
- grunt test-integration --baseUrl=https://${IP}
notifications:
email:
on_success: never
on_failure: never
我是一个新手,需要一些帮助。. 我正在使用Selenium 2.2.0和FF v7。Windows XP上的0.1 我已经成功地在IE中录制并回放了一个java脚本,但是每当我尝试在FF中执行相同的脚本时,我都会收到以下错误消息: 45000 ms后无法连接到端口7055上的主机127.0.0.1 我在很多地方读到,如果我将firefox版本降级到3.6,脚本将运行良好,但我并不热衷于降级。有人能
在我的eclipse中运行代码(Selenium webDrive/java);但它显示错误45000毫秒后无法连接到端口7055上的主机127.0.0.1。Firefox控制台输出"......代码和错误的截图
Selenium在Firefox中运行量角器测试时未启动。依赖版本详细信息指定如下: 让我知道哪里出了问题,我错过了什么? 节点版本: 量角器版本:业力版本: Selenium版本:火狐版本: Firefox控制台输出:
我收到一个错误:无法连接到端口7055上的主机127.0.0.1 当我尝试在ubuntu服务器上用firefox运行selenium时。 谁能帮忙吗? 我有硒版2.53
我有一个测试箱。看起来Jenkins将ssh插入并执行正在运行的特定作业中描述的命令。 在这里,我试图运行我的Selenium Webdriver测试,但它告诉我在启动Firefox时有错误。最后的想法是在这个盒子上完全运行webtests,并且还拍摄一些错误的截图。 我使用的是selenium-java-2.25.jar、Firefox10、linux操作系统。 有趣的是,我可以将ssh手动插入
Firefox控制台输出: 45000 ms后无法连接到端口7055上的主机127.0.0.1。 我一直在尽我所能。请有人能帮助我的版本和maven项目的依赖集;我正在使用Java。