I'm trying to make all this stuff work together. Created a jenkins job with this configuration:
Environment Build: android-19 emulator
spawned by the andorid emulator jenkins plugin
Build steps: Appium starting in this way:
appium --full-reset --udid $ANDROID_AVD_DEVICE
Invoke Gradle script with on a cucumber task:
sourceSets {
test {
java {
srcDir 'src/java'
}
resources {
srcDir 'src/resources'
}
}
}
task cucumber() {
dependsOn assemble, compileTestJava
doLast {
javaexec {
main = "cucumber.api.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = ['-f', 'pretty', '--glue', 'gradle.cucumber', 'src/resources']
}
}
}
I created an android studio project with two modules: one with the android app sources and one cucumber-jvm "test" module with all the cucumber tests.
The problem is that, when i try to start a jenkins job that make this steps:
Compile android studio project --> Start Emulator --> Start Appium server --> compile cucumber test --> execute test
The build fail everytime and these are the logs:
https://gist.github.com/redirect11/9273079
and
https://gist.github.com/redirect11/9273043
These are the 200th job try.... and i don't remember what are the differences... but the error it's the same...
Appium server and jenkins started by the same user on the same machine... can some on help me pointing me in the right way?