0
運行我testing.xml作爲TestNG的滿足其正常運行,但運行的gradle 測試任務時,不執行測試如何通過gradle測試任務執行測試方法?
testing.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite guice-stage="DEVELOPMENT" name="Default suite">
<test verbose="2" name="test">
<classes>
<class name="com.example.EmpBusinessLogicTest"/>
</classes>
</test> <!-- Default test -->
</suite> <!-- Default suite -->
構建。 gradle
buildscript { ext { springBootVersion ='1.4.1.RELEASE' } 庫{ mavenCentral() } 依賴{ 類路徑( 「org.springframework.boot:彈簧引導gradle這個-插件:$ {springBootVersion}」) }}
apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'spring-boot' jar { baseName = 'demo' version = '0.0.1-SNAPSHOT' } sourceCompatibility = 1.8 targetCompatibility = 1.8 repositories { mavenCentral() } dependencies { compile('org.springframework.boot:spring-boot-starter-web') testCompile('org.springframework.boot:spring-boot-starter-test') compile('org.testng:testng:6.9.10') } test { useTestNG() { suites 'src/main/resources/testing.xml' } }
能任何人都幫我執行gradle測試任務?