Moving a TestNG project done in java from maven .pom files to a gradle build.gradle. I was able to get most of the stuff working, but I'm getting an error when running the tests.
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [ApplicationBeans.xml]; nested exception is java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
I am using the spring framework in the test framework code.
Using the following gradle file:
apply plugin: 'java'
dependencies {
compile project(':qa_common')
testCompile(group: 'org.uncommons', name: 'reportng', version:'1.1.4') {
exclude(module: 'testng')
}
testCompile group: 'com.google.inject', name: 'guice', version:'3.0'
compile group: 'xml-apis', name: 'xml-apis', version:'1.4.01'
}
task testDiscounts(type: Test) {
useTestNG() {
suites 'src/test/resources/testsuites/env_qa/TestSuite.xml'
}
}
task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
Can anyone tell me where I went wrong?
Aucun commentaire:
Enregistrer un commentaire