diff --git a/CHANGELOG.md b/CHANGELOG.md index b9ca6ad7..9aa867d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ ### Fixed +## [4.7.2] - 2025-2-03 + +### Fixed +- Fixed duplication of Groovy tests in results ([#1098](https://github.com/opendevstack/ods-quickstarters/issues/1098)) + ## [4.7.1] - 2025-1-31 ### Fixed diff --git a/e2e-spock-geb/files/build.gradle b/e2e-spock-geb/files/build.gradle index 51339f51..45a8d967 100644 --- a/e2e-spock-geb/files/build.gradle +++ b/e2e-spock-geb/files/build.gradle @@ -92,18 +92,17 @@ dependencies { sourceSets { [TestExecutionPhases.INSTALLATION, TestExecutionPhases.INTEGRATION, TestExecutionPhases.ACCEPTANCE].each { phase -> - "$phase" { - groovy { - srcDir "src/test/${phase}/groovy" - } - java { - srcDir "src/test/${phase}/java" - } - resources { - srcDir 'src/test/resources' + [TestLanguages.JAVA, TestLanguages.GROOVY].each { language -> + "$phase-$language" { + "$language" { + srcDir "src/test/${phase}/${language}" + } + resources { + srcDir 'src/test/resources' + } + compileClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntimeClasspath + runtimeClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntimeClasspath } - compileClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntimeClasspath - runtimeClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntimeClasspath } } } @@ -156,17 +155,9 @@ def executeTest(def type, def language, def env) { } } - // Since groovy tests are junit tests and they are run as part of java tests, - // we disable here the execution of junit tests if not running for java language. - // jenkins to jira integration does not allows to run a test more than once. - if ("${language}".equalsIgnoreCase(TestLanguages.JAVA)) { - // Mandatory to run JUnit 5 test but incompatible with groovy tests - useJUnitPlatform() - } - ignoreFailures = "${CONTINUE_WHEN_TEST_FAIL}" - testClassesDirs = sourceSets["${type}"].output.classesDirs - classpath = sourceSets["${type}"].runtimeClasspath + testClassesDirs = sourceSets["${type}-${language}"].output.classesDirs + classpath = sourceSets["${type}-${language}"].runtimeClasspath systemProperty "geb.env", env