tags:

views:

654

answers:

4

When calling a WCF service from a console app, asp.net app, wpf/winform app, you have to have a app.config or web.config file for the WCF service endpoint information. But from FitNesse, I'm calling a fixture which is a .dll (class library) and this fixture is calling my WCF service. It can't call the service because I can't include the endpoint information that it needs - because DLLs can't have app.config files. Any ideas on how to call a WCF service from FitNesse.

+1  A: 

Anything you can do with a config in WCF can also be done programmatically. Could you create the endpoints in code and then compile it?

Nick
+1  A: 

I had to place my app.config file in the dotnet directory of FitNesse. I also had to add a path to that config file in my FitNesse page, like this.

!path C:\fitnesse20090214\fitnesse\dotnet\app.config

A: 

A similar approach that I have working is to make a copy of the app.config for the testrunner.
So I make a copy of app.config as FitServer.exe.config (and TestRunner.exe.config) as a post build step in my fixture project.
As the previous post indicates, the config file needs to be in the same directory as the runner.

This worked with the 1.6 version of the fitnesse .Net runners as well as the latest 20090214 release.

Lee
A: 

See http://stackoverflow.com/questions/654259/fitnesse-configuration-files/655503 for more info on FitNesse configuration files.

Joseph Anderson