通过SSH运行Test NG Selenium测试 [英] Running Test NG Selenium Tests Through SSH

查看:105
本文介绍了通过SSH运行Test NG Selenium测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个服务器A,上面装有eclipse,testNG,selenium和其他东西.我有另一个服务器B,上面装有Bamboo设置.

I have a server, A, that has eclipse, testNG, selenium, and stuff set up on it. I have another server, B, with Bamboo setup on it.

我能够在服务器A上运行一个testNG脚本,该脚本在正在开发的Web应用程序上运行一组硒测试.我使用了eclipse中显示的vm属性中的java命令,通过Bamboo来在服务器B上创建ssh任务.

I am able to, on server A, run a testNG script that runs a set of selenium tests on a web application that I'm developing. I used the java command that is in the properties of the vm that was shown in eclipse to create an ssh task on server B through Bamboo.

但是,似乎它只是坐在那里而从未完成过Bamboo的工作.

However, it seems like it just sits there and never actually finishes the job in Bamboo.

我试图从另一台笔记本电脑SSH到Server A,并运行相同的命令.我没有收到任何错误消息或任何东西,但是系统似乎只是冻结了.

I tried to ssh to Server A from another laptop, and ran the same command. I don't get any error messages or anything, but the system seems to just freeze.

我该如何解决?

推荐答案

安装Xvfb,它伪装成显示器,但未在任何地方显示.
sudo apt-get install xvfb.

Install Xvfb, which pretends to be a monitor, but doesn't show up anywhere.
sudo apt-get install xvfb.

如果您希望减少错误,请添加这些字体,但是这些警告并不重要.
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

If you want less errors add these fonts, but those warning aren't important.
sudo apt-get install xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic

然后开始运行,并将您的显示设置为系统不会使用的内容.这是我的工作,请记住&使终端在后台运行.
Xvfb :99 -ac &
export DISPLAY=:99
firefox &

Then start it running and set your display to something the system won't use. Here is what I do, remeber the & makes the terminal run something in the background.
Xvfb :99 -ac &
export DISPLAY=:99
firefox &

我退出ssh终端时,红宝石也在Rails服务器断开连接时遇到问题.要解决该问题,请使用屏幕.屏幕运行另一个终端而不受ssh的影响.
sudo apt-get install screen

Also I was having problems with a ruby on rails server disconnecting when I quit the ssh terminal. To fix that problem use Screen. Screen runs another terminal without being affected by the ssh.
sudo apt-get install screen

然后在执行上述操作之前先启动屏幕.
screen

Then just start screen before you you do the stuff above.
screen


要退出当前屏幕窗口,只需单击"Ctrl + A",然后单击"D",然后返回键入screen -r.

这篇关于通过SSH运行Test NG Selenium测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆