DBFit - Could not invoke constructor for Connect[4]

瘦欲@ 提交于 2019-12-25 07:53:05

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!