Вопрос

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