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.
我遇到了不可重复的测试用例。比如说,一个测试用例是将文件上传到第三方服务。该服务限制一天上传一次。因此,如果我运行时间戳为 2012.10.10 的测试用例,我实际上无法在同一天重新运行测试。我们如何设计我们的测试用例来克服这个问题?谢谢你。
您所做的不是测试您的代码,而是测试第三方服务。
在这种情况下,您应该针对服务的模拟运行测试,而不是真实的东西。