我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制? [英] I need to run multiple Fitnesse Tests from the command line at the same time. How can I get around the Port resrtriction?

查看:36
本文介绍了我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制?现在,我启动第一个 .bat 文件来运行一个套件.当我尝试启动第二个 .bat 文件时,出现端口正在使用的错误.我的 .bat 文件包含以下命令.java -jar Fitnesse-standalone.jar -p 80 -c "MeasureTestSuite.COLighting?suite&format=text".

解决方案

您可以通过 -p 开关更改 wiki 的端口,并使用 -DSLIM_PORT= 控制 Slim 服务器使用的端口(如果您使用超薄测试系统):

java -DSLIM_PORT=5555 -jar Fitnesse-standalone.jar -p 8080 -c MeasureTestSuite.COLighting?suite&format=text

仅当运行真正并发开始时才需要设置 Slim 端口,而不是在命令执行之间有几秒钟的时间(FitNesse 试图找到一个空闲端口,但这样做有点笨拙).

附言如果 Slim 在进程中运行(即调试模式),FitNesse 的下一个版本将不再需要手动配置 Slim 端口以进行并发运行.因此,例如,您可以使用 jUnit 集成(这已经消除了选择 wiki 端口的需要)由构建服务器运行多个并发测试,而根本不必担心端口.

I need to run multiple Fitnesse Tests from the command line at the same time. How can I get around the Port resrtriction? Right now, I start the first .bat file to run one suite. When I try to start the second .bat file I get an error that the Port is in use. My .bat files consist of the following command. java -jar fitnesse-standalone.jar -p 80 -c "MeasureTestSuite.COLighting?suite&format=text".

解决方案

You can change the port of the wiki with the -p switch, and use -DSLIM_PORT= to control the port used by the Slim server (if you use the Slim test system):

java -DSLIM_PORT=5555 -jar fitnesse-standalone.jar -p 8080 -c MeasureTestSuite.COLighting?suite&format=text

Setting the Slim port is only needed if the runs really start concurrently, not when there is a couple of seconds between the execution of the commands (FitNesse tries to find a free port, but does this a bit awkwardly).

P.S. The next release of FitNesse will no longer require manual configuration of the Slim port for concurrent runs, IF Slim is run in-process (i.e. DEBUG mode). So, for instance, you can have multiple concurrent test runs by a build server using the jUnit integration (which already removes the need to select a wiki port) without having to worry about ports at all.

这篇关于我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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