mirror of
https://github.com/burakkaygusuz/selenium-4-grid-k8s-docker.git
synced 2021-06-27 00:03:24 +03:00
82 lines
2.7 KiB
Groovy
82 lines
2.7 KiB
Groovy
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent
|
|
|
|
plugins {
|
|
id 'java'
|
|
}
|
|
|
|
version '1.0'
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
compileJava.options.encoding = 'UTF-8'
|
|
}
|
|
|
|
description = "Selenium 4 Grid & K8s & Docker"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
|
|
def selenium_version = '4.0.0-beta-4'
|
|
def junit_jupiter_version = '5.8.0-M1'
|
|
def junit_platform_version = '1.8.0-M1'
|
|
def assertj_core_version = '3.20.2'
|
|
def log4j_version = '2.14.1'
|
|
def apache_commons_version = '3.12.0'
|
|
def fasterxml_jackson_version = '2.12.3'
|
|
def sl4j_version = '2.0.0-alpha1'
|
|
|
|
testImplementation(
|
|
"org.seleniumhq.selenium:selenium-java:$selenium_version",
|
|
"org.seleniumhq.selenium:selenium-support:$selenium_version",
|
|
"org.seleniumhq.selenium:selenium-remote-driver:$selenium_version",
|
|
"org.apache.logging.log4j:log4j-core:$log4j_version",
|
|
"org.apache.logging.log4j:log4j-api:$log4j_version",
|
|
"org.apache.commons:commons-lang3:$apache_commons_version",
|
|
"org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version",
|
|
"org.junit.jupiter:junit-jupiter-params:$junit_jupiter_version",
|
|
"org.junit.platform:junit-platform-launcher:$junit_platform_version",
|
|
"org.assertj:assertj-core:$assertj_core_version",
|
|
"org.slf4j:slf4j-simple:$sl4j_version",
|
|
"org.slf4j:slf4j-api:$sl4j_version",
|
|
"com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$fasterxml_jackson_version",
|
|
"com.fasterxml.jackson.core:jackson-databind:$fasterxml_jackson_version"
|
|
)
|
|
|
|
testRuntimeOnly(
|
|
"org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
|
|
)
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
systemProperty "junit.jupiter.execution.parallel.enabled", "true"
|
|
systemProperty "junit.jupiter.execution.parallel.config.strategy", "dynamic"
|
|
|
|
afterSuite { desc, result ->
|
|
if (!desc.parent)
|
|
println("${result.resultType} " +
|
|
"(${result.testCount} tests, " +
|
|
"${result.successfulTestCount} passed, " +
|
|
"${result.failedTestCount} failed, " +
|
|
"${result.skippedTestCount} skipped)")
|
|
}
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
testLogging.events(
|
|
TestLogEvent.FAILED,
|
|
TestLogEvent.PASSED,
|
|
TestLogEvent.SKIPPED,
|
|
TestLogEvent.STANDARD_ERROR,
|
|
TestLogEvent.STANDARD_OUT)
|
|
testLogging.exceptionFormat TestExceptionFormat.SHORT
|
|
testLogging.showCauses true
|
|
testLogging.showExceptions true
|
|
testLogging.showStackTraces true
|
|
}
|