I have one test framework project which was created via Gradle/Idea, and since this project is one test framework project and all the test cases were located under the src/main/java folder.
sourceSets{
test{
java.srcDirs = ['src/main/java']
}
}
By Using gradle, I want to create one new task in build.gradle to run the specified testNG xml file via command line.
task runTest(type: Test){
useTestNG(){}
}
but always I got error like the below.
Error occurred during initialization of VM
java/lang/NoClassDefFoundError : java/lang/Object
Could anyone support this? Thanks a lot.