Initialize grails web app
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import org.openqa.selenium.chrome.ChromeDriver
|
||||
import org.openqa.selenium.chrome.ChromeOptions
|
||||
import org.openqa.selenium.htmlunit.HtmlUnitDriver
|
||||
|
||||
environments {
|
||||
|
||||
// run via “./gradlew -Dgeb.env=chrome -Dwebdriver.chrome.driver=/Applications/chromedriver iT”
|
||||
chrome {
|
||||
driver = { new ChromeDriver() }
|
||||
}
|
||||
|
||||
// run via “./gradlew -Dgeb.env=chromeHeadless -Dwebdriver.chrome.driver=/Applications/chromedriver iT”
|
||||
chromeHeadless {
|
||||
driver = {
|
||||
ChromeOptions o = new ChromeOptions()
|
||||
o.addArguments('headless')
|
||||
new ChromeDriver(o)
|
||||
}
|
||||
}
|
||||
|
||||
// run via “./gradlew -Dgeb.env=htmlUnit iT”
|
||||
htmlUnit {
|
||||
driver = { new HtmlUnitDriver() }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.baeldung.grails
|
||||
|
||||
import grails.testing.gorm.DomainUnitTest
|
||||
import spock.lang.Specification
|
||||
|
||||
class StudentSpec extends Specification implements DomainUnitTest<Student> {
|
||||
|
||||
def setup() {
|
||||
}
|
||||
|
||||
def cleanup() {
|
||||
}
|
||||
|
||||
void "test something"() {
|
||||
expect:"fix me"
|
||||
true == false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user