如何让 ddsteps 插入日期和日期测试数据集中的时间值?

发布于 2024-08-07 16:41:03 字数 617 浏览 3 评论 0原文

目前,我使用 DDsteps 作为单元测试的数据驱动测试框架。除了将 DateTime 数据插入数据库时​​之外,它工作得很好。

示例数据输入行(存储在 Excel 中):

APS_ID
99${my.unique_four_digits}
APS_LOGIN_DT
3/21/2007 8:52

DDsteps 将生成以下 SQL 来加载日期时间字段:

  • 插入 MySchema.Applications (APS_ID, APS_LOGIN_DT) 值 (?, ?)
  • 插入 MySchema.Applications (APS_ID, APS_LOGIN_DT) 值 ('993919', '2007-03-21')

如何让 DDsteps 识别输入数据行上的时间戳?

更新:

  • www.ddsteps.org
  • 这些数据驱动的测试针对 Oracle 数据库运行

Currently I am using DDsteps as a datadriven testing framework for my unit tests. It works quite well, except when inserting DateTime data into the database.

Example data input row (stored in excel):

APS_ID
99${my.unique_four_digits}
APS_LOGIN_DT
3/21/2007 8:52

DDsteps will generate this SQL to load the date time field:

  • insert into MySchema.Applications (APS_ID, APS_LOGIN_DT) values (?, ?)
  • insert into MySchema.Applications (APS_ID, APS_LOGIN_DT) values ('993919', '2007-03-21')

How do I get DDsteps to recognize the time stamp on the input data row?

updated:

  • www.ddsteps.org
  • These data driven tests are run against an oracle database

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽清梦 2024-08-14 16:41:03

快速浏览一下 DDSteps 站点,它看起来在幕后使用了 DbUnit。您介意我问一下您使用的是什么数据库服务器吗?我必须使用 OracleDataTypeFactory 让 DbUnit 接受日期时间。

A quick look at the DDSteps site and it looks to be using DbUnit under the hood. Do you mind if I ask what database server you are using? I had to use the OracleDataTypeFactory to get DbUnit to accept date times.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文