简体   繁体   English

运行测试时,FitSharp FormatException

[英]FitSharp FormatException when running tests

I installed a clean version of Fitnesse (v20121220) and the latest version of FitSharp (.net 4). 我安装了干净的Fitnessfite版本(v20121220)和最新版本的FitSharp(.net 4)。

I've created a fitnesse test page but cannot get the tests to run - whenever I try, the tests immediately fail with the following stack trace in the standard output: - 我已经创建了fitnesse测试页面,但无法运行测试-每当尝试尝试时,测试都会立即失败,并在标准输出中显示以下堆栈跟踪:-

System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at fit.Runner.FitSocket.EstablishConnection(String request)
   at fitnesse.fitserver.FitServer.EstablishConnection()
   at fitnesse.fitserver.FitServer.Run(IList`1 CommandLineArguments)
   at fitnesse.fitserver.FitServer.Run(IList`1 commandLineArguments, Memory memory, ProgressReporter reporter)
   at fitSharp.Machine.Application.Shell.Run()
   at fitSharp.Machine.Application.Shell.Execute()
   at fitSharp.Machine.Application.Shell.RunInCurrentDomain(IList`1 commandLineArguments)
   at fitSharp.Machine.Application.Shell.RunInNewDomain(AppDomainSetup appDomainSetup, IList`1 commandLineArguments)

And the following error as Internal Exception: - Internal Exception: 并将以下错误作为内部异常:-内部异常:

FitClient: external process terminated before a connection could be established.

My root configuration is pretty basic: - 我的根配置非常基本:

!define COMMAND_PATTERN {%m -a "FullPathToAcceptanceTests.dll.config" -r fitnesse.fitserver.FitServer,C:\fitnesse\fitsharp\fit.dll %p}
!define TEST_RUNNER {c:\fitnesse\fitsharp\Runner.exe}
!path "FullPathToAcceptanceTests.dll"

Obviously the FullPathToAcceptanceTests points to where my fitnesse acceptance tests code is. 显然,FullPathToAcceptanceTests指向我的适应性接受测试代码所在的位置。

I don't understand why this is happening - I've used Fitnesse / Fitsharp before without problems, but this just doesn't seem to want to work. 我不明白为什么会这样-我之前使用过Fitnesst / Fitsharp都没有问题,但是这似乎并不奏效。

I think that this problem might be caused by running Fitnesse on default 80 port. 我认为此问题可能是由在默认80端口上运行Fitnesse引起的。 FitLibrary and Fit are sometimes using the same port, which might cause an issue. FitLibrary和Fit有时使用相同的端口,这可能会引起问题。 Try using different port. 尝试使用其他端口。

I have 我有

!path "FullPathToAcceptanceTests.dll"
!define COMMAND_PATTERN {%m -r "fitnesse.fitserver.FitServer,C:\fitnesse\fitsharp\fit.dll" %p}
!define TEST_RUNNER {c:\fitnesse\fitsharp\Runner.exe}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM