1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/nikytwo-geb-sample

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
build.gradle 2 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
nikytwo Отправлено 05.11.2015 16:32 84bc6bd
import org.apache.tools.ant.taskdefs.condition.Os
group 'com.nikytwo'
version '1.0-SNAPSHOT'
ext {
// The drivers we want to use
drivers = ["firefox", "chrome"]
ext {
groovyVersion = '2.4.1'
gebVersion = '0.12.2'
seleniumVersion = '2.46.0'
chromeDriverVersion = '2.19'
phantomJsVersion = '1.9.7'
}
}
apply plugin: 'groovy'
apply plugin: 'java'
sourceCompatibility = 1.5
repositories {
// mavenCentral()
maven{ url 'http://maven.oschina.net/content/groups/public/'}
}
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.11'
compile "org.gebish:geb-core:0.12.2"
compile "org.seleniumhq.selenium:selenium-firefox-driver:2.45.0"
compile "org.seleniumhq.selenium:selenium-chrome-driver:2.45.0"
compile "org.seleniumhq.selenium:selenium-ie-driver:2.45.0"
// compile "org.seleniumhq.selenium:selenium-htmlunit-driver:2.45.0"
compile "org.seleniumhq.selenium:selenium-support:2.45.0"
testCompile "org.gebish:geb-junit4:$gebVersion"
testCompile group: 'junit', name: 'junit', version: '4.11'
}
drivers.each { driver ->
task "${driver}Test"(type: Test) {
// reports {
// html.destination = reporting.file("$name/tests")
// junitXml.destination = file("$buildDir/test-results/$name")
// }
outputs.upToDateWhen { false } // Always run tests
systemProperty "geb.build.reportsDir", reporting.file("$name/geb")
systemProperty "geb.env", driver
// If you wanted to set the baseUrl in your build…
// systemProperty "geb.build.baseUrl", "http://myapp.com"
}
}
chromeTest {
def chromedriverFilename = Os.isFamily(Os.FAMILY_WINDOWS) ? "chromedriver.exe" : "chromedriver"
def chromedriverDir = file("$buildDir/resources/test")
systemProperty "webdriver.chrome.driver", new File(chromedriverDir, chromedriverFilename).absolutePath
}
test {
dependsOn drivers.collect { tasks["${it}Test"] }
enabled = false
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/nikytwo-geb-sample.git
git@api.gitlife.ru:oschina-mirror/nikytwo-geb-sample.git
oschina-mirror
nikytwo-geb-sample
nikytwo-geb-sample
master