如何在基于外部属性的gradle上排除Spring Boot测试中的集成测试?
尝试使用@ActiveProfiles。但这没用
最佳答案
这是我找到的解决方案。
您可以基于外部系统属性来排除它。
-Dtest.profile=integration
并在build.gradle中
test {
if (System.properties['test.profile'] != 'integration') {
exclude '**/*integrationTests*'
}
}
关于java - 在Java,Spring Boot,gradle上进行集成测试以排除构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47097414/