diff options
author | 2023-07-31 10:59:39 +0200 | |
---|---|---|
committer | 2023-08-08 09:50:35 +0200 | |
commit | 1c4023ccc06e633233ed642eb9d1ac85e82feaf0 (patch) | |
tree | d1b42076f13075d4bc7255120a5934f753774559 /build.gradle | |
parent | c38f1100b43a48a9f86bc50c2e560ae94d15956a (diff) |
Issue-ID: PORTALNG-35
Change-Id: I606b3f265dfdb98d7eb9cfd8ab021e2895ee5152
Signed-off-by: marian.vaclavik@telekom.com <marian.vaclavik@telekom.com>
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..abc7675 --- /dev/null +++ b/build.gradle @@ -0,0 +1,115 @@ +plugins { + id 'java' + id 'io.qameta.allure' version '2.9.3' +} +apply plugin: 'io.qameta.allure' +group 'org.onap.portalng.e2e' +version '1.0' + +repositories { + mavenCentral() +} + +dependencies { + implementation 'io.cucumber:cucumber-junit:7.3.3' + implementation 'io.cucumber:cucumber-java:7.3.3' + implementation 'com.codeborne:selenide:6.14.0' + implementation 'io.qameta.allure:allure-cucumber7-jvm:2.20.1' + implementation 'net.serenity-bdd:serenity-cucumber:3.4.3' + implementation 'net.serenity-bdd:serenity-core:3.4.3' + implementation 'net.serenity-bdd:serenity-junit:3.4.3' + implementation 'io.qameta.allure:allure-selenide:2.20.1' + implementation 'org.assertj:assertj-core:3.22.0' + + testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter:5.8.2' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-params:5.8.2' + testImplementation 'org.junit.vintage:junit-vintage-engine:5.8.2' +} + +configurations { + cucumberRuntime { + extendsFrom testImplementation + } +} + +allprojects { + repositories { + mavenLocal() + mavenCentral() + } + + apply plugin: 'idea' + apply plugin: 'java' + apply plugin: 'java-library' + apply plugin: 'io.qameta.allure' + + java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + test { + useJUnitPlatform() + testLogging.showStandardStreams = true + systemProperty "cucumber.filter.tags", System.getProperty("cucumber.filter.tags") + } + gradle.startParameter.continueOnFailure = true +} + +tasks.register('cucumber') { + cleanupAllure + dependsOn assemble, testClasses + doLast { + javaexec { + systemProperties['selenide.headless'] = 'false' + main = "io.cucumber.core.cli.Main" + classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output + args = [ + '--plugin', 'pretty', + '--plugin', 'io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm', + '--glue', 'org.onap.portalng.e2e', + 'src/test/resources'] + } + } +} + +tasks.register('cucumberLocalDebug') { + cleanupAllure + dependsOn assemble, testClasses + doLast { + javaexec { + systemProperties['selenide.headless'] = 'false' + main = "io.cucumber.core.cli.Main" + classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output + args = [ + '--plugin', 'pretty', + '--plugin', 'io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm', + '--glue', 'org.onap.portalng.e2e', + '--tags', '@debug', + 'src/test/resources'] + } + } +} + +tasks.register('cucumberCli') { + cleanupAllure + dependsOn assemble, testClasses + doLast { + javaexec { + systemProperties['selenide.headless'] = 'true' + main = "io.cucumber.core.cli.Main" + classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output + args = [ + '--plugin', 'pretty', + '--plugin', 'io.qameta.allure.cucumber7jvm.AllureCucumber7Jvm', + '--glue', 'org.onap.portalng.e2e', + 'src/test/resources'] + } + } +} + +tasks.register('cleanupAllure') { + delete "allure-results" +}
\ No newline at end of file |