html tool

2016年8月2日星期二

linux 虚拟机安装gui测试环境

问题:
通过ssh 在linux上测试chrome页面

解决方式:
安装Xvfb,指定使用DISPLAY运行
[最简单流程]
sudo apt-get install xvfb
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic
Xvfb :99 -ac &
export DISPLAY=:99
google-chrome &
sudo apt-get install screen
screen

google-chrome setup in linux
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get install -f

参考:
http://stackoverflow.com/questions/7109840/cannot-start-browser-for-selenium-through-ssh
http://askubuntu.com/questions/79280/how-to-install-chrome-browser-properly-via-command-line
http://stackoverflow.com/questions/28392949/running-chromium-inside-docker-gtk-cannot-open-display-0
http://stackoverflow.com/questions/15929685/running-test-ng-selenium-tests-through-ssh/19236773#19236773

其他问题:
1.firefox运行时有碰到如下提示
Client failed to connect to the D-BUS daemon
但不影响测试

2.Xvfb :21 -screen 0 1024x768x24 +extension RANDR &

Cannot establish any listening sockets - Make sure an X server isn't already running(EE)

没有评论:

发表评论