-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (58 loc) · 1.7 KB
/
build.gradle
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
plugins {
id 'java'
}
// Apply the java plugin to add support for Java
apply plugin: 'java'
apply plugin: 'application'
apply plugin: 'checkstyle'
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.testng:testng:6.9.10'
// https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java
implementation 'org.seleniumhq.selenium:selenium-java:4.21.0'
}
buildDir = 'build'
test {
useTestNG() {
useDefaultListeners = true // generates the test report
suites "src/test/resources/testng.xml"
}
afterSuite { desc, result ->
if (!desc.parent) {
println "\nTEST RESULT: ${result.resultType}"
println "TEST SUMMARY: RAN ${result.testCount} TESTS, " +
"${result.successfulTestCount} SUCCEEDED, " +
"${result.failedTestCount} FAILED, " +
"${result.skippedTestCount} SKIPPED"
}
}
testLogging {
events "PASSED", "SKIPPED", "FAILED", "STANDARD_OUT", "STANDARD_ERROR"
exceptionFormat = 'full'
// Optionally do:
showStackTraces = true
}
testLogging.showStandardStreams = true
test.outputs.upToDateWhen {false}
}
mainClassName = 'demo.App'
checkstyle {
toolVersion = '8.45' // Check for the latest version compatible with your setup
config = rootProject.resources.text.fromFile('__CRIO__/checkstyle.xml')
sourceSets = [sourceSets.test]
ignoreFailures = true
}
tasks.withType(Checkstyle) {
reports {
xml.required = true
html.required = false
}
}
test {
dependsOn assemble
mustRunAfter clean
}