I have two projects:
-
Application project — Project A
-
Project with acceptance tests — Project B
I need to run tests from the project B at project A.
Project B is available for Project A as a dependency.
buid.gradle — Project B:
task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}
task testJar(type: Jar, dependsOn: testClasses) {
classifier = 'tests'
from sourceSets.test.output
}
artifacts {
archives sourceJar, testJar
}
uploadArchives {
repositories.mavenDeployer {
if(project.ext.isReleaseVersion){
repository (url: '[RepUrl]') {
authentication (userName: 'user', password: 'pass')
}
println "Upload to internal"
}else{
snapshotRepository (url: '[RepUrl]') {
authentication (userName: 'user', password: 'pass')
}
println "Upload to snapshots"
}
pom.version = '0.1'
pom.artifactId = 'acceptance-tests'
pom.groupId = 'group'
}
build.gradle — project A:
dependencies {
testRuntime ('group:acceptance-tests:latest.release:tests')
}
When I run gradlew test
int the project A is not carried out a single test.
Tell me, please , where is my mistake.