1

我正在尝试使用空手道和 Spring JDBC 运行一些基本的数据库测试(如 Demo Project 中的 DBUtils 类中所述)。

这是我正在做的事情:

 Background:
    # Read url/username/pwd and provide it to the class
    * def config = read('env_file.json')
    * def DbUtils = Java.type('DbConnection')
    * def db = new DbUtils(config)

 Scenario: Validate the modd_ts is present in lob table

    * def createdTs = db.readRows('SELECT crtd_ts FROM tableA ')
    * print createdTs

这是它返回的内容:

com.intuit.karate - [print] [{"crtd_ts":{"nanos":0}},{"crtd_ts":{"nanos":0}}

不知道为什么它应该将时间戳返回为 "nanos":0 ,这对我来说似乎是一个错误。请确认,我将在 github 中打开一个。

4

1 回答 1

1

这不是空手道的问题,而是DbUtils. 由您来编写适合您的环境和数据库等的内容。请记住,这只是karate-demo示例的一部分。

于 2017-10-26T21:40:52.457 回答