jonnybot0 commented on code in PR #310:
URL: https://github.com/apache/groovy-geb/pull/310#discussion_r2983719550


##########
integration/geb-testcontainers/geb-testcontainers.gradle:
##########
@@ -0,0 +1,142 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+plugins {
+    id 'geb.test-framework-integration-module'
+}
+
+// tests require java 18+ for SimpleFileServer
+java {
+    toolchain {
+        languageVersion = JavaLanguageVersion.of(21)
+    }
+    sourceCompatibility = JavaVersion.VERSION_11
+    targetCompatibility = JavaVersion.VERSION_11
+}
+
+ext {
+    // The drivers we want to use in containers
+    // see https://github.com/SeleniumHQ/docker-selenium
+    // for browsers per platform
+    // drivers = ["firefox", "chrome", "edge"] // no safari container
+    drivers = ["firefox"]
+}
+
+// add integration tests
+sourceSets {
+    integrationTest {
+        groovy {
+            srcDirs = ['src/integration-test/groovy']
+        }
+        resources {
+            srcDirs = ['src/integration-test/resources']
+        }
+        compileClasspath += sourceSets.main.output
+        runtimeClasspath += sourceSets.main.output
+    }
+}
+
+configurations {
+    integrationTestImplementation.extendsFrom implementation
+    integrationTestRuntimeOnly.extendsFrom runtimeOnly
+}
+
+dependencies {
+    api project(":module:geb-spock")
+    api libs.spock.core
+    api libs.selenium.chrome.driver
+    api libs.selenium.firefox.driver
+    api libs.selenium.edge.driver
+    api libs.selenium.remote.driver
+    api libs.testcontainers.selenium
+
+    implementation libs.selenium.support
+
+
+    testImplementation libs.junit.platform.testkit
+    testRuntimeOnly libs.junit.platform.launcher
+
+    integrationTestRuntimeOnly libs.junit.platform.launcher
+}
+
+
+tasks.withType(Test).configureEach {
+    outputs.upToDateWhen { false } // always run tests
+    useJUnitPlatform()
+}
+
+tasks.named('test') {
+    testLogging {
+        events 'passed', 'skipped', 'failed'
+    }
+
+    systemProperty('geb.container.recording.mode', 'RECORD_ALL') // also 
RECORD_FAILING
+}
+
+tasks.register('integrationTest', Test) {

Review Comment:
   The way this task is wired up seems to prevent someone from running just one 
test. I think I've fixed that in my feedback PR at 
https://github.com/apache/groovy-geb/pull/313. @me if that doesn't look right, 
though.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to