Question

I have the following page for a FitNesse test:

!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,FitSharp\fit.dll %p}
!define TEST_RUNNER {FitSharp\Runner.exe}
!define PATH_SEPARATOR {;}
!path FitSharp\dbfit.sqlserver.dll

!|dbfit.SqlServerTest|
!|Connect|data source=(local);integrated security=SSPI;database=mydatabase;|

!|Insert|MonthEnd|
|Date|
|31-Jul-2012|

...Tests...

Is there a way in which I can get the connection string from an external configuration file instead of embedding it in the page?

Was it helpful?

Solution

You can do this by using Connect using file.

...
!|dbfit.SqlServerTest                        |
|Connect using file|DatabaseConnection.config|
...

with the following in the DatabaseConnection.config file

# DBFit connection properties
connection-string=data source=(local);integrated security=SSPI;database={databaseName};
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top