本文介绍了Java的SQL Server存根的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过JDBC驱动程序使用MSSQL Server的Java应用程序.我可以使用某种存根进行测试吗?例如,我想测试我的应用程序如何处理连接错误,SQL Server磁盘不足和其他异常的情况.用真正的SQL Server来模拟它是非常困难和复杂的.

I have a java application that is using MSSQL server through the JDBC driver. Is there some kind of stub that I can use for testing? For example I want to test how my application handle cases of connection errors, SQL server out of disk, and other exceptions. It's pretty hard and complex to simulate this with real SQL server.

谢谢

推荐答案

我认为不存在类似的问题.
您最好在计算机/局域网上设置自己的数据库并进行测试.

I don't think there's something like that.
You'd be better off setting up your own database and testing on your machine/lan.

我所知道的是:

  • freeSQL
  • db4free

都支持MySQL,但不支持MS-SQL.我确实认为这与许可问题和限制有关.因此,恐怕您找不到适用于MS-SQL db的类似服务.

Both support MySQL, but none MS-SQL. I do think that has to do with licensing issues and limitations. So I'm afraid you won't find a similar service for MS-SQL db.

这篇关于Java的SQL Server存根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-18 20:05