配置和使用mongodb样机服务器进行单元测试 [英] Configure & use mongodb mockup server for unit testing

查看:72
本文介绍了配置和使用mongodb样机服务器进行单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用MongoDB存储为Java代码开发一些Junit测试.有没有允许我初始化模拟内存MongoDB服务器的框架/库?

(其想法是仅在任何机器上独立于MongoDB是否已安装并正在运行进行测试).

提前谢谢!

解决方案

fongo 可能就是您要寻找的.

I have to develop some Junit tests for Java code using a MongoDB store. Is there any framework/library which permits me initializing a mock in-memory MongoDB server?

(The idea is to test only the code itself, that means, in any machine independently on if MongoDB is installed & running).

Thanks in advance!

解决方案

fongo might be what you are looking for.

这篇关于配置和使用mongodb样机服务器进行单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆