如何解决空手道框架:在空手道方案概述中针对多行JSON调用js或java互操作函数的问题
我能够通过方案大纲在空手道框架中遍历json数组中的数据,但是不幸的是,它停止了识别方案大纲中的任何Java互操作函数调用。
例如:
方案概述:发布NewAccount kafka消息,该消息读取动态csv文件new-account api中的accountIds并验证数据库中的数据 给定路径“ / new-account”
And messageHeader.message_type = 'NEW_ACCOUNT'
And messageHeader.publisher_id = 'Customer'
And newAccount.messageHeader = messageHeader
And newAccount.accountNumber = <account_id>
And header Content-Type = 'text/plain'
And request <account_id>
When method post
Then retry until status 200
* call initializer.sleep 1
* print 'row: ',__row
#Validate DB entries in journal table for new account
* def journal_query = "SELECT * FROM journal where account_number ="+newAccount.accountNumber*1
* print "query==",journal_query
* def accounts = call initializer.dbUtils.readRows(journal_query)
* match accounts == '#[1]'
* match accounts[0].account_number == <account_id>*1
* match accounts[0].account_sub_type == 'CASH'
* match accounts[0].entry_type_code == 'B'
* match accounts[0].firm == 'NFSC'
new_account.feature:232-评估(js)失败:initializer.dbUtils.readRows(journal_query),javax.script.ScriptException:TypeError:initializer.dbUtils.readRows不是第1行的函数 堆栈跟踪:jdk.scripting.nashorn / jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:477)
有人知道为什么吗?以及如何解决此问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。