fitsharp | Functional testing tools for .NET | Testing library
kandi X-RAY | fitsharp Summary
kandi X-RAY | fitsharp Summary
Functional testing tools for .NET
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fitsharp
fitsharp Key Features
fitsharp Examples and Code Snippets
Community Discussions
Trending Discussions on fitsharp
QUESTION
Running a test in Fitnesse gives:
Could not complete testing: fitnesse.slim.SlimError: Error SLiM server died before Header Message could be read.
When using Slim RunnerW.exe to debug my test I get an exception:
System.BadImageFormatException
: Could not load file or assembly 'file:///c:\path\assemby.exe' or one of its dependencies. The module was expected to contain an assembly manifest.
I used ProcessExplorer to check and RunnerW.exe was running in 64bit mode. My code is compiled with "Any CPU", the only difference with another working project is that it is a .net 5 (core) project using FitSharp 2.8.2.1 NuGet package.
After enabling the FusionLog it was clear that it could not load my main test assembly. This is part of the log:
...ANSWER
Answered 2021-Jun-09 at 15:38Some things that finally got me up and running:
1: Do not reference the executable (file ending with .exe
) but refer to the .dll
instead. No matter how it is compiled, trying to load the the .exe file as an assembly will always throw a System.BadImageFormatException
.
2: Fish the .Net Core versions of Runner.exe
and RunnerW.exe
(and their dependencies) out of the NuGet package and use those instead of the older SLIM .Net runners (if you are migrating). FusionLog
does absolutely nothing with .Net Core, so if there is any logging going on then you know that the process is not running .Net Core.
3: If you got the FitSharp projects from GitHub and are linking to the projects instead of using NuGet, then remove the post build actions to copy the files. Instead go to your test project Dependencies
-> Projects
-> fit
open Properties (F4) and set the options Reference Output Assembly
, Copy Local
and Copy Local Sattelite Assemblies
to Yes. Do the same for the FitSharp and Runner projects.
QUESTION
I'm getting System.IO.FileNotFoundException trying to test my application. My Folder hierarchy is as follow:
- I have my fitSharp folder with the Runner.exe and the .dll's
- The system under test is in my debug folder
- i have a reference to this .dll with: !path ........\Debug\XXXXX.dll
So the problem is, as I'm using Dependecy Injection fitSharp is not able to find the required .dll for unity. I'm getting FileNotFound Exception all the time.
The thing is if i copy all the files (.dll) to my fitSharp folder where the Runner.exe is, the test is working fine.
The problem is, fitsharp is not able to find files in a different folder and i have no idea how to provide this path to fitSharp.
I tried already to use a configuration.xml file to declare all the needed DLLs but still no.
...ANSWER
Answered 2019-Apr-25 at 15:32You can try explicitly loading the missing DLL:
QUESTION
The root page in FitNesse is a great place to add configuration which can be used by every page. Things like defining the test system or test runner. Is there any way of overriding those settings, though, for a single test page or for a test suite?
I have a project using FitSharp (FitNesse for .NET) and have the appropriate settings in the root page. Now I want to include a test suite that uses a Java fixture. So, for that suite I want to override the command pattern and test runner defined in the root page.
As far as I can see, settings defined in a root page or in a higher-level suite page are not overridden when I redefine them in a lower level suite page. Is there any way of getting around this or will I have to redefine the appropriate settings in every suite - FitSharp settings in each of the .NET suites and Java settings in the Java suites?
...ANSWER
Answered 2017-Oct-12 at 02:13You can nest suites inside suites, so you can have two top-level 'container' suites, one for all .NET suites and one for all Java suites. Define your settings in these 'container' suites, not the root.
QUESTION
I know there is a plugins.properties file for configuring the FitNesse environment and customizing it, and that FitSharp supports a suite configuration file for certain environment settings. But does FitNesse or FitSharp support a general purpose configuration file, for setting symbols or markup variables?
The reason I ask is that I'm using RestFixture, a plug-in that allows calls to RESTful web services. A RestFixture table takes the host URL as a fixture argument. I'd like to move the host URL out of the test pages into a configuration file, so that the test pages are identical in different environments, such as dev, test and production.
Defining a markup variable in the root page gets me most of the way there but I'd prefer to move the variable out of any pages entirely.
By the way, I'm using the .NET port of RestFixture, RestFixture.Net, so I'm really looking for a solution that applies to .NET / FitSharp.
...ANSWER
Answered 2017-Sep-15 at 07:41Running the same tests on different environments is archieved by using symbolic links.
As you are aware, you can set a variable for all the tests in a suit by putting it on the suite page:
QUESTION
According to FitSharp issue 123 it wasn't possible to in July 2014. I was wondering if this has changed in the years since.
...ANSWER
Answered 2017-Jul-16 at 20:15There's no way defined in the Slim protocol to do this. We'd have to inspect the parameter types to see if a method wants the Slim symbols passed to it, e.g.
QUESTION
I am using the FitNesse / FitSharp (c#) for testing purposes.
I can create normal fixture like ColumnFixtures, RowFixtures, DoFixtures etc. but not I am looking for a way to read columns and bind them dynamically.
The reason for this is, I still already have a huge amount of Pojo objects in my own library and don't want to repeat all class members again. Therefor i am searching for a way to handle column dynamically.
e.g.
...ANSWER
Answered 2017-Jun-29 at 03:02Take a look at the source code for the Compute fixture (https://fitsharp.github.io/Fit/ComputeFixture.html) and see if it helps.
You can write a fixture that processes cells dynamically like this:
QUESTION
I'd like to create a new fixture type in the .NET flavour of FitNesse, similar to Fabrizio Cannizzo's RestFixture, which is written in Java. RestFixture can be used with both FIT and SLIM and I would like my .NET version to also work with both FIT and SLIM.
In FIT it's possible to create a new fixture type in .NET since the fixture classes are defined in the .NET test runner, FitSharp, and they can just be extended. However, I understand that in SLIM the fixture classes are included in FitNesse, not in the test-runner, and FitNesse is written in Java. So does that mean we can't create new fixture types for SLIM in .NET?
If it is possible to create a new fixture type for SLIM in .NET, how can I do it?
...ANSWER
Answered 2017-Jun-10 at 20:34Your understanding is correct. SLIM fixtures can only be written in Java. This is one of the limitations of SLIM (or benefits, depending on your point of view!)
QUESTION
I'm trying to get FitNesse (slim tests running via fitSharp) to process tables stored in a variable. Both approach A & B below render the same on the page, but only approach B will run.
Approach A
...ANSWER
Answered 2017-Jan-16 at 19:59Try creating a separate page with the test table.
In your real test page you can include this page multiple times, after assigning values to the variables.
QUESTION
I have a simple C# Column fixture class which independently tests fine. I have a sql server table which again, independently tests fine. If I test both, testing the SQL table first, again all is OK. However if I test the C# first, then the SQL test fails 'Type 'Connect' not found in assemblies'
So this works fine...
...ANSWER
Answered 2017-Feb-10 at 22:52Update: The original solution described below does not work for DbFit. Here is a workaround:
In your fixture SampleDo
, you can include the following to let SqlServerTest
handle the rest of the tables in the test:
QUESTION
The error I got is fitnesse.testsystems.slim.SlimCommunicationException: Could not send/receive data with SUT
FitNesse Code:
!define TEST_SYSTEM {slim}
!path C:\FitNesseUsingSelenium\bin\Debug*.dll
!define COMMAND_PATTERN {%m -r fitSharp.Slim.Service.Runner %p}
!define TEST_RUNNER {C:\FitSharp.2.5.0\lib\net40\Runner.exe}
!|import| |FitNesseUsingSelenium|
!|FitSeleniumFramework|
|TextInTitle|isTitleCorrect?|
|Google|yes|
|google|no|
|bing|no|
Actually is it opening and closing the browser perfectly but after the instead of displaying the results in FitNesse page, it always throwing the error "Could not complete testing: fitnesse.testsystems.slim.SlimCommunicationException: Could not send/receive data with SUT" enter image description here
But the same is working perfectly in Java using selenium
Could you please suggest some idea to resolve this issue???
...ANSWER
Answered 2017-Jan-17 at 19:12Try adding this line:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install fitsharp
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page