Skip to content

Commit

Permalink
build integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Jan 4, 2024
1 parent 30c7088 commit 881e998
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
32 changes: 32 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,38 @@ dependencies {
exclude module: 'slf4j-api'
exclude module: 'asm'
}
testImplementation "org.mockito:mockito-core"
testImplementation "org.grails.plugins:geb"
testImplementation "org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-safari-driver:$seleniumSafariDriverVersion"
testImplementation "org.seleniumhq.selenium:selenium-remote-driver:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-api:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-support:$seleniumVersion"
testImplementation "org.seleniumhq.selenium:selenium-htmlunit-driver:2.52.0"
testImplementation "net.sourceforge.htmlunit:htmlunit:2.18"
}

apply from: rootProject.file('gradle/testVerbose.gradle')

webdriverBinaries {
if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
chromedriver "$chromeDriverVersion"
geckodriver "$geckodriverVersion"
}
}

tasks.withType(Test) {
systemProperty "geb.env", System.getProperty('geb.env', 'chromeHeadless')
systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")

if (!System.getenv().containsKey('GITHUB_ACTIONS')) {
systemProperty 'webdriver.chrome.driver', System.getProperty('webdriver.chrome.driver')
systemProperty 'webdriver.gecko.driver', System.getProperty('webdriver.gecko.driver')
} else {
systemProperty 'webdriver.chrome.driver', "${System.getenv('CHROMEWEBDRIVER')}/chromedriver"
systemProperty 'webdriver.gecko.driver', "${System.getenv('GECKOWEBDRIVER')}/geckodriver"
}
}

groovydoc.doFirst {
Expand Down
6 changes: 6 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ groovyVersion=3.0.11
cglibNodepVersion=3.2.9
joddWotVersion=3.3.8
servletApiVersion=4.0.1
chromeDriverVersion=87.0.4280.20
gebVersion=5.4.1
geckodriverVersion=0.24.0
seleniumSafariDriverVersion=3.14.0
seleniumVersion=3.141.59
webdriverBinariesVersion=2.6
asciidoc=true
githubSlug=graceframework/grace-cache
githubBranch=master
Expand Down

0 comments on commit 881e998

Please sign in to comment.