I'm trying to setup a jenkins for testing a web application. For this setup I have a gradle build file.
apply plugin: 'java'
apply plugin: 'maven'
defaultTasks 'clean','compileJava','test'
group = 'automationtest'
version = '1.1-SNAPSHOT'
description = ""
repositories {
maven { url "http://ift.tt/1eAGeW3" }
}
dependencies {
compile group: 'org.seleniumhq.selenium', name: 'selenium-java', version:'2.52.0'
compile group: 'org.uncommons', name: 'reportng', version:'1.1.4'
compile group: 'org.apache.velocity', name: 'velocity', version:'1.7'
compile group: 'com.google.inject', name: 'guice', version:'4.0'
testCompile group: 'junit', name: 'junit', version:'3.8.1'
testCompile group: 'org.testng', name: 'testng', version:'6.9.4'
}
test{
useTestNG() {
suites "src/test/resources/BasicTestXML/LoginTesten.xml"
}
}
With the above build file I can perfectly run my automation test in jenkins. If I have a localhost running for the application. But to make it less independable of human interaction I want to have jenkins first build the web application and after that run the automation tests on the builded web application. Is this possible? And how can I make this happen? Can I build them from a git or do they need to be at the same location for this to happen? The webapp is also an ant project so does this bring any difficulties?
Aucun commentaire:
Enregistrer un commentaire