问题
My script:
!contents -R2 -g -p -f -h
!path lib/*.jar
|import |
|dbfit.SqlServerTest|
!|dbfit.SqlServerTest|
!|Connect|SUKHI-PC\SQLEXPRESS|SUKHI-PC\XXX|XXX|XXX|
Masked a few details but the error message is:
Could not invoke constructor for Connect[4].
Don't understand. From what I've read online it may be that my Path is not correct but no idea what it's looking for as Connect is a command not fixture. Any help would be appreciated.
回答1:
I know its an old post, but for future reference purposes; "Could not invoke constructor for Connect[4]" error is thrown by fitnesse when I was trying to connect to a sql server in a dbfit test using slim server without calling DatabaseEnvironment constructor. you can overcome this error by planning your dbfit test something like below..
!define TEST_SYSTEM {fit}
|Import |
|dbfit.fixture|
|dbfit.SqlServerTest|
!|DatabaseEnvironment|sqlserver |
|Connect |11.11.11.11:8888|username|password|databasename|
来源:https://stackoverflow.com/questions/32920046/dbfit-could-not-invoke-constructor-for-connect4