从命令行停止ASP WebDev和Selenium服务器 [英] Stopping ASP WebDev and Selenium servers from command line

查看:87
本文介绍了从命令行停止ASP WebDev和Selenium服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是第一次将Selenium测试引入我的构建中.我认为要在NAnt中执行此操作,必须首先启动WebDev服务器:

I am introducing Selenium tests into my build for the first time. I figured that to do this in NAnt, I would have to start the WebDev server first:

<exec program="path/to/WebDev.WebServer.exe"
   commandline="/port:51150 /path:path/to/website"
   failonerror="true"
   resultproperty="selenium.webdev.server.running"
   spawn="true">
</exec>

然后启动Selenium服务器:

Then start the Selenium server:

<exec program="path/to/java.exe"
   commandline="-jar path/to/selenium-server.jar"
   failonerror="false"
   spawn="true">
</exec>

然后运行我的测试.这行得通.我无法弄清楚的是,测试完成后如何杀死WebDev和Selenium服务器?

Then run my tests. This works. What i can't figure out is how do I kill the WebDev and Selenium servers when my tests have finished?

推荐答案

这是我在本地执行的操作,但也应该通过简单的http get请求进行远程工作:

Here is what i do locally, but should work remotely too with a simple http get request:

http://localhost:4444/selenium-server/driver/?cmd = shutDown

或针对Selenium的1.0.1后版本:

or for post 1.0.1 versions of Selenium:

将"shutDown"替换为"shutDownSeleniumServer"

replace "shutDown" with "shutDownSeleniumServer"

这篇关于从命令行停止ASP WebDev和Selenium服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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