2

On executing a simple Fitnesse test, I am getting the error :

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

On the Fitnesse server, the error is:

"software caused connection abort socket write error"

.Net version used - 4.0

The contents on the page :

!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer, dotnet2\fit.dll %p}
!define TEST_RUNNER {dotnet2\Runner.exe}

Has anyone encountered this issue and also can anyone let me know how this can be fixed

Error

System.ArgumentException: String cannot have zero length. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) at System.Reflection.Assembly.LoadFrom(String assemblyFile) at fitSharp.Machine.Engine.CurrentDomain.LoadAssembly(String assemblyPath) at fitSharp.Machine.Engine.ApplicationUnderTest.Assemblies.AddAssembly(String assemblyName) at fitSharp.Machine.Application.Shell.Execute() at fitSharp.Machine.Application.Shell.Run(IList`1 commandLineArguments)

Mike Stockdale
  • 5,201
  • 3
  • 27
  • 33
SystemQA
  • 21
  • 1
  • 4
  • Is this all the time, or sometimes? I believe I have seen something similar recently (using Slim with Java), but it's not happening all the time just once every so often... – Fried Hoeben Mar 30 '16 at 19:45
  • I am trying to set up fitnesse. This is happening all the time. – SystemQA Mar 31 '16 at 22:19
  • Just wanted to update. At that time the issue was fixed after unblocking(Right Click -> Properities -> Unblock) the fit.dlls – SystemQA Apr 09 '18 at 21:21

3 Answers3

1

Remove the space after the comma in:

-r fitnesse.fitserver.FitServer, dotnet2\fit.dll

Actually, with recent versions of fitSharp, you don't need to specify the fit.dll. You can just use:

-r fitnesse.fitserver.FitServer
Mike Stockdale
  • 5,201
  • 3
  • 27
  • 33
1

I've been getting this same message for an absolutely trival test:

!path lib/*.jar

I was running DbFit for the first time.

I turned on verbose logging by including -v in the .bat file as follows:

java -cp "lib\dbfit-docs-3.2.0.jar;lib\fitnesse-20150424-standalone.jar" fitnesseMain.FitNesseMain -v %*

and noticed that there were spaces in the path showing up in the 3rd parameter in the Starting Process parameter list of .jar files. This was causing the initial call to fitnesse to fail, which resulted in the error message.

I fixed this by moving my DbFit installation to a folder without spaces: C:\dbfit. This resolved the issue.

On to the next issue now...

Hope that helps someone.

Whiz
  • 169
  • 1
  • 4
1

I added an app.config file to the FitNesse runner.exe and everything started working.

  1. Go to the directory where you have the Runner.exe installed
  2. add a text (config) file named runner.exe.config
  3. add the following xml to it so that when runner.exe starts it will be allowed to load the fit.dll.

    <configuration> <runtime> <loadFromRemoteSources enabled="true"/> </runtime> </configuration>

Run your tests again and they should work.

Edit - Just noticed that if you want to run the debug version (runnerw.exe) you will need to add the a config file (with same xml as above) named runnerw.exe.config also.

Found the config details at: https://docs.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/dd409252(v=vs.100)

raddevus
  • 5,847
  • 5
  • 51
  • 65