我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制?

编程入门 行业动态 更新时间:2024-10-25 08:28:01
本文介绍了我需要同时从命令行运行多个 Fitnesse 测试.如何绕过端口限制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我需要同时从命令行运行多个 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 22:23:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1401123.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   命令行   端口   测试   Fitnesse

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!