-
Notifications
You must be signed in to change notification settings - Fork 32
/
build.gradle
113 lines (101 loc) · 3.63 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
plugins {
id 'java-library'
id 'application'
id 'io.qameta.allure' version '2.8.1'
}
group 'cloud.autotests'
version '1.0'
sourceCompatibility = 1.8
targetCompatibility = 1.8
defaultTasks 'help'
ext {
allureVersion = "2.13.8"
selenideVersion = "5.18.0"
junitVersion = "5.7.0"
}
repositories {
mavenCentral()
}
allure {
version = "${allureVersion}"
autoconfigure = true
aspectjweaver = true
useJUnit5 {
version = "${allureVersion}"
}
}
dependencies {
testImplementation (
"org.aspectj:aspectjweaver:1.9.5",
"com.codeborne:selenide:${selenideVersion}",
"io.qameta.allure:allure-selenide:${allureVersion}",
"io.rest-assured:rest-assured:4.1.2",
"io.qameta.allure:allure-rest-assured:${allureVersion}",
"com.fasterxml.jackson.core:jackson-annotations:2.10.3",
"io.appium:java-client:7.3.0",
"ch.qos.logback:logback-classic:1.2.3",
"io.qameta.allure:allure-ee-junit-platform:3.28.2",
"org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
tasks.withType(Test) {
systemProperties += System.properties
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
if (System.hasProperty("web_threads")) {
systemProperties += [
'junit.jupiter.execution.parallel.enabled' : true,
'junit.jupiter.execution.parallel.mode.default' : 'concurrent',
'junit.jupiter.execution.parallel.mode.classes.default' : 'concurrent',
'junit.jupiter.execution.parallel.config.strategy' : 'fixed',
'junit.jupiter.execution.parallel.config.fixed.parallelism': System.getProperty("web_threads").toInteger()
]
}
testLogging {
lifecycle {
events "started", "skipped", "failed", "standard_error", "standard_out"
exceptionFormat "short"
}
}
}
test {
useJUnitPlatform()
}
task web(type: Test) {
useJUnitPlatform {
includeTags 'web'
}
systemProperty 'platform', 'web'
}
task android(type: Test) {
useJUnitPlatform {
includeTags 'android'
}
systemProperty 'platform', 'android'
}
task ios(type: Test) {
useJUnitPlatform {
includeTags 'ios'
}
systemProperty 'platform', 'ios'
}
help {
doFirst {
println ""
println "************************************************************************ "
println "*** *** "
println "*** Welcome to *** "
println "*** https://github.com/autotests-cloud/selenide-junit5-allure-gradle *** "
println "*** *** "
println "*** *** "
println "*** You can run tests by one of the following commands: *** "
println "*** ./gradlew web *** "
println "*** ./gradlew android *** "
println "*** ./gradlew ios *** "
println "*** *** "
println "************************************************************************ "
println ""
}
}