-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
84 lines (73 loc) · 2.61 KB
/
build.gradle.kts
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
plugins {
java
eclipse
idea
}
group = "com.github.eataborda.api"
version = "1.0-SNAPSHOT"
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(22))
}
}
repositories {
mavenCentral()
}
val allureVersion = "2.29.0"
val aspectJVersion = "1.9.22.1"
val agent: Configuration by configurations.creating {
isCanBeConsumed = true
isCanBeResolved = true
}
defaultTasks ("clean", "test")
tasks.test {
doFirst {
jvmArgs = listOf("-javaagent:${agent.singleFile}")
}
val includedTags = System.getProperty("includeTags")
val includedTagsSet = (includedTags != null)
val excludedTags = System.getProperty("excludeTags")
val excludeTagsSet = (excludedTags != null)
if (includedTagsSet && excludeTagsSet) {
useJUnitPlatform {
includeTags(includedTags)
excludeTags(excludedTags)
}
} else if (includedTagsSet && !excludeTagsSet) {
useJUnitPlatform {
includeTags(includedTags)
}
} else if (!includedTagsSet && excludeTagsSet) {
useJUnitPlatform {
excludeTags(excludedTags)
}
} else {
useJUnitPlatform()
}
testLogging.showStandardStreams = true
ignoreFailures = true
}
tasks.withType<Test> {
systemProperty("includeTags", System.getProperty("includeTags"))
systemProperty("excludeTags", System.getProperty("excludeTags"))
systemProperty("USER", System.getProperty("USER"))
systemProperty("PASSWORD", System.getProperty("PASSWORD"))
systemProperty("AUTHORIZATION", System.getProperty("AUTHORIZATION"))
systemProperty("showAllureAttachments", System.getProperty("showAllureAttachments", "true"))
systemProperty("junit.jupiter.extensions.autodetection.enabled", true)
}
dependencies {
agent("org.aspectj:aspectjweaver:${aspectJVersion}")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.3")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.3")
testImplementation ("io.rest-assured:rest-assured:5.5.0")
testImplementation("io.rest-assured:json-path:5.5.0")
testImplementation ("io.rest-assured:json-schema-validator:5.5.0")
testImplementation(platform("io.qameta.allure:allure-bom:$allureVersion"))
testImplementation("io.qameta.allure:allure-junit5:$allureVersion")
testImplementation("io.qameta.allure:allure-rest-assured:$allureVersion")
testImplementation("org.assertj:assertj-core:3.26.3")
testImplementation("ch.qos.logback:logback-classic:1.5.12")
testImplementation("ch.qos.logback:logback-core:1.5.12")
testImplementation("com.google.code.gson:gson:2.11.0")
}