Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 DTO 使用 morphia 映射到 MongoDB。有没有什么方法可以为 MongoDB 生成随机测试数据(根据我的 DTO),而无需在内部编写一些东西?
不,您必须通过生成 mongoimport 兼容文件或通过 Morphia(首选)使用您自己的一些代码来生成测试数据。