Fitnesse 和 dbFit:无法在商店查询中使用变量
Fitnesse and dbFit: unable to use variable in store query
!|DatabaseEnvironment|ORACLE|
|Connect|${HOSTNAME}|${USERNAME}|${PASSWORD}|
|set option|bind symbols|false|
!|Query|!-select acct_id ts from dual-!|
|acct_id?|
|>>acct_id|
|Set Parameter|acct_id|<<acct_id|
!|query|SELECT * from table1 where id=:acct_id|
|accr_id?|
出现如下错误:
ava.lang.Error: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at dbfit.fixture.StoreQuery.doTable(StoreQuery.java:48)
at fit.Fixture.interpretFollowingTables(Fixture.java:120)
at fit.Fixture.interpretTables(Fixture.java:106)
at fit.Fixture.doTables(Fixture.java:80)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)
有什么办法让它工作吗?
当您使用“:vaiableName”在脚本中使用变量时,您需要将绑定符号设置为 true。
|设置选项|绑定符号|true|
!|DatabaseEnvironment|ORACLE|
|Connect|${HOSTNAME}|${USERNAME}|${PASSWORD}|
|set option|bind symbols|false|
!|Query|!-select acct_id ts from dual-!|
|acct_id?|
|>>acct_id|
|Set Parameter|acct_id|<<acct_id|
!|query|SELECT * from table1 where id=:acct_id|
|accr_id?|
出现如下错误:
ava.lang.Error: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
at dbfit.fixture.StoreQuery.doTable(StoreQuery.java:48)
at fit.Fixture.interpretFollowingTables(Fixture.java:120)
at fit.Fixture.interpretTables(Fixture.java:106)
at fit.Fixture.doTables(Fixture.java:80)
at fit.FitServer.process(FitServer.java:81)
at fit.FitServer.run(FitServer.java:56)
at fit.FitServer.main(FitServer.java:41)
有什么办法让它工作吗?
当您使用“:vaiableName”在脚本中使用变量时,您需要将绑定符号设置为 true。
|设置选项|绑定符号|true|