Reputation: 14720
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?
Upvotes: 1
Views: 3012
Reputation: 14720
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};
Upvotes: 3