DbUnit

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(链接)
 
(未显示1个用户的2个中间版本)
第1行: 第1行:
 
{{top news}}
 
{{top news}}
  
DbUnit is a [[JUnit]] extension (also usable with Ant) targeted for database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent way to avoid the myriad of problems that can occur when one test case corrupts the database and causes subsequent tests to fail or exacerbate the damage.
+
DbUnit 使您可以容易地执行 JDBC 查询并获取它们的值。使用 DbUnit JDBC 包装器而不是纯粹的 JDBC 有几个理由:
 +
* 可以用 SQL 查询创建一个 Dataset ,并使用 DbUnit 的 assertion(断言)方法。
 +
* 可以用 SQL 查询创建一个 Dataset ,并将它保存为一个 FlatXmlDataSet 。可以在以后将它重新装载到数据库中。
 +
* 可以容易地从任何行中获取列的内容,无需进行迭代。
  
DbUnit has the ability to export and import your database data to and from XML datasets. Since version 2.0, DbUnit can works with very large dataset when use in streaming mode. DbUnit can also helps you to verify that your database data match expected set of values.  
+
==链接==
 +
*[http://www.dbunit.org/ DbUnit官方网站]
 +
*[http://www.sourceforge.net/projects/dbunit DbUnit在Sourceforge]
  
http://dbunit.sourceforge.net/
+
[[category:software development]]
 
+
[[category:unit testing]]
[[Category:Software Development]]
+
[[category:software testing]]
[[Category:Agile]]
+
[[category:agile]]

2013年2月20日 (三) 01:17的最后版本

DbUnit 使您可以容易地执行 JDBC 查询并获取它们的值。使用 DbUnit JDBC 包装器而不是纯粹的 JDBC 有几个理由:

  • 可以用 SQL 查询创建一个 Dataset ,并使用 DbUnit 的 assertion(断言)方法。
  • 可以用 SQL 查询创建一个 Dataset ,并将它保存为一个 FlatXmlDataSet 。可以在以后将它重新装载到数据库中。
  • 可以容易地从任何行中获取列的内容,无需进行迭代。

[编辑] 链接

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱