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.
我有两台服务器,一台作为 api 工作,另一台用于从 api(webui) 检索数据。如果我在 webui 中对视图执行任何单元测试,它正在 api 中创建对象。如何在测试后删除 api 中的对象完成了吗?你能建议任何方法来处理这个问题吗?
如果您正在测试,那么您应该有一个单独的系统,它不会影响生产中使用的任何东西。
例如,您可以使用模拟从 api 创建预期的响应。