Skip to content
Permalink
Browse files

Add VNC recording of test

  • Loading branch information...
kiview committed Sep 27, 2018
1 parent e9311bd commit 7b00f051b73b74a3ffb4bbc20919e9562a8f805f
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/test/groovy/AcceptanceTest.groovy
@@ -6,6 +6,7 @@ import org.testcontainers.DockerClientFactory
import org.testcontainers.containers.BrowserWebDriverContainer
import org.testcontainers.containers.DockerComposeContainer
import org.testcontainers.containers.Network
import org.testcontainers.lifecycle.TestDescription
import spock.lang.Shared
import spock.lang.Stepwise

@@ -21,6 +22,7 @@ class AcceptanceTest extends GebSpec {
@Shared
BrowserWebDriverContainer chrome = new BrowserWebDriverContainer()
.withDesiredCapabilities(DesiredCapabilities.chrome())
.withRecordingMode(BrowserWebDriverContainer.VncRecordingMode.RECORD_ALL, new File("build/test-results"))

def setupSpec() {
compose.start()
@@ -50,6 +52,17 @@ class AcceptanceTest extends GebSpec {
}

def cleanupSpec() {
chrome.afterTest(new TestDescription() {
@Override
String getTestId() {
return "id"
}

@Override
String getFilesystemFriendlyName() {
return "myTest"
}
}, Optional.empty())
chrome.stop()
compose.finished(null)
}

0 comments on commit 7b00f05

Please sign in to comment.
You can’t perform that action at this time.