Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why we have to specify useTestNG() for tests with Gradle?

If we want to use for our test TestNG we have to write something like:

dependencies {
   compile project(':model')
   testCompile 'org.testng:testng:6.8'
}

test.useTestNG()

But when using Spock we specify just the dependency

dependencies {
   compile project(':model')
   testCompile 'org.spockframework:spock-core:0.7-groovy-2.0'
}

Why we have to specify test.useTestNG()?

like image 242
Xelian Avatar asked Jul 23 '14 11:07

Xelian


1 Answers

Spock tests get run via JUnit, which is the Gradle default. Alternatively, tests can be run via TestNG.

like image 64
Peter Niederwieser Avatar answered Oct 13 '22 22:10

Peter Niederwieser