質問

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?

役に立ちましたか?

解決

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};
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top