jediwhale / fitsharp

Functional testing tools for .NET
http://fitsharp.github.io
Other
152 stars 73 forks source link

Can't get old simple samples to work. #172

Closed EffectiveAgileDev closed 4 years ago

EffectiveAgileDev commented 4 years ago

Sorry, but I'm stumped. I've read through several of your responses to issues and seem to be getting further, but still get an error "Unable to start test system 'slim': fitnesse.slim.SlimError: Error connecting to SLiM server on localhost:8070".

I've removed the %p from the command line and am using the SLIM_PORT=8065. I do get a passing test on the Import on the same page, but the rest does not work.

When I am able to get the RunnerW to run it returns an error about a port can only be used once, which led me to a couple of registry changes, to no avail.

If I can't get this going, I will need to refund thousands of $ for a class. ;(

jediwhale commented 4 years ago

What versions are you using for FitNesse, fitSharp? Net Core or Net Framework? Windows or Linux?

EffectiveAgileDev commented 4 years ago

Thanks for responding. FitNesse - 20200501 fitSharp - 2.2.net.35 and 2.2.net.40 Both Net Core and Net Framework. Windows 10

Just trying to get an old Hello World to work first. Maybe I just missed something. Here is the test...

!define TEST_SYSTEM {slim} !define SLIM_PORT {8065} !define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,C:\Fitnesse\dotnet2_2_40\fitsharp.dll } !define TEST_RUNNER {C:\Fitnesse\dotnet2_2_40\Runner.exe} !path C:\Fitnesse\CodeSamples\SlimExamples\slim_example3\bin\Debug\slim_example3.dll |Import | |slim_example3| |First Test | |string1|string2|Concatenate?| |Hello |World |Hello World |
jediwhale commented 4 years ago

There was a change in 2019 to fix a problem with Slim communication, which may have broken older releases. With FitNesse 20200501, please try fitSharp 2.7.1 or later. Or if you have to stay with fitSharp 2.2, try to find an old version of FitNesse with a similar release date.

EffectiveAgileDev commented 4 years ago

Thanks again, Mike. Still no joy. Got 2.7.1. Import in the page runs, so it finds the .dll. The error is could not find class. I have two now. Double checked spelling and all the normal stuff. Any ideas? Here is my test page...

!define TEST_SYSTEM {slim} !define SLIM_PORT {8065} !define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,C:\Fitnesse\fitsharp-2_7_1\fitsharp.dll } !define TEST_RUNNER {C:\Fitnesse\fitsharp-2_7_1\Runner.exe} !path C:\Fitnesse\CodeSamples\SlimExamples\slim_example2\bin\Debug\slim_example2.dll |import | |slim_example2| |Should I Buy Milk | |cash in wallet|credit card|pints of milk remaining|go to store?| |0 |no |0 |no | |10 |no |0 |yes | |0 |yes |0 |yes | |10 |yes |0 |yes | |0 |no |1 |no | |10 |yes |2 |no |
EffectiveAgileDev commented 4 years ago

I found the samples I built for classes in the summer of 2018. They all work on that computer. However, when I copy them over to the current laptop, I get the same error. Go figure.

jediwhale commented 4 years ago

I ran the sample and it works when I put %p in the COMMAND_PATTERN

!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner,C:\Fitnesse\fitsharp-2_7_1\fitsharp.dll %p}

EffectiveAgileDev commented 4 years ago

Thanks for all your help, Mike. My bad. Or as some clients told me years ago, ID10T. Simple coding error. The test class must be public.