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.
我想问一下grails(即data.xml)中测试文件的最佳位置在哪里。它是 test/ 文件夹吗?
如何在集成测试中轻松加载测试文件?
谢谢,马特奥
在测试/集成/资源中
然后,即如果您使用 spock 进行测试,您可以执行以下操作:
def mediaBundlerService = Mock(MediaBundlerService) mediaBundlerService.getPath(_) >> [path: new File('test/integration/resources/test-bundle/').absolutePath + "/"]