-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (73 loc) · 2 KB
/
Copy pathbuild.gradle
File metadata and controls
85 lines (73 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
plugins {
id 'java'
}
group = 'ru.school21.example'
version = '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.release = 21
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.3'
testImplementation 'org.junit.platform:junit-platform-suite:1.10.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.10.3'
testImplementation 'org.testng:testng:7.10.2'
testRuntimeOnly 'org.slf4j:slf4j-simple:2.0.9'
}
tasks.withType(Test).configureEach {
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
systemProperty 'file.encoding', 'UTF-8'
testLogging {
events 'passed', 'skipped', 'failed'
showExceptions = true
showCauses = true
showStackTraces = true
}
}
test {
description = 'Run all JUnit 5 tests without repeating suite selections.'
useJUnitPlatform {
includeEngines 'junit-jupiter'
}
include 'junitTests/**'
}
tasks.register('testNG', Test) {
description = 'Run all TestNG tests.'
group = 'verification'
useTestNG()
include 'testNGTests/**'
}
tasks.register('junitSuites', Test) {
description = 'Run the two explicit JUnit Platform suites.'
group = 'verification'
useJUnitPlatform {
includeEngines 'junit-platform-suite'
}
include 'suites/**'
}
tasks.register('testNGMethods', Test) {
description = 'Run MethodExamplesTestNG using the XML suite.'
group = 'verification'
useTestNG {
suites 'src/test/resources/testng-suites/testng-methods.xml'
}
}
tasks.register('testNGExample', Test) {
description = 'Run TestsExampleTestNG using the XML suite.'
group = 'verification'
useTestNG {
suites 'src/test/resources/testng-suites/testng-example.xml'
}
}
check {
dependsOn tasks.named('testNG')
}