-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
130 lines (110 loc) · 3.41 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
plugins {
id 'java'
id 'java-library'
id 'io.qameta.allure' version '2.10.0'
}
[compileJava, compileTestJava]*.options*.encoding = "UTF-8"
group = 'ru.egor.qa.selenidetest'
version = '1.0-SNAPSHOT'
def selenideVersion = '6.12.4',
junitJupiterVersion = '5.9.2',
cucumberJavaVersion = '7.12.0',
cucumberJunitVersion = '7.12.0',
allureVersion = '2.20.1',
jacksonVersion = '2.15.2',
assertjVersion = "3.23.1",
aspectjVersion = "1.9.5"
repositories {
jcenter()
mavenCentral()
}
allure {
report {
version.set(allureVersion)
}
adapter {
aspectjWeaver.set(true)
frameworks {
junit5 {
adapterVersion.set(allureVersion)
}
}
}
}
configurations {
cucumberRuntime {
extendsFrom testImplementation
}
}
dependencies {
api 'org.apache.commons:commons-math3:3.6.1'
//JUnit
testImplementation(
"org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}",
"org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}"
)
//Selenide
implementation "com.codeborne:selenide:${selenideVersion}"
//Cucumber
testImplementation(
"io.cucumber:cucumber-java:$cucumberJavaVersion",
"io.cucumber:cucumber-core:$cucumberJavaVersion",
"io.cucumber:cucumber-junit:${cucumberJunitVersion}"
)
//Allure
testImplementation(
"io.qameta.allure:allure-cucumber7-jvm:${allureVersion}",
// "io.qameta.allure:allure-java-commons:${allureVersion}",
// "io.qameta.allure:allure-commandline:${allureVersion}",
// "io.qameta.allure:allure-junit5:${allureVersion}",
// "io.qameta.allure:allure-assertj:${allureVersion}",
// "io.qameta.allure:allure-selenide:${allureVersion}"
)
//Assertj
testImplementation(
"org.assertj:assertj-core:$assertjVersion",
"org.aspectj:aspectjweaver:$aspectjVersion"
)
//Log4j2
testImplementation(
'org.slf4j:slf4j-simple:2.0.7',
'org.apache.logging.log4j:log4j-slf4j-impl:2.20.0',
'org.apache.logging.log4j:log4j-jul:2.20.0'
)
//Jackson
testImplementation(
"com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-core:${jacksonVersion}",
"com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
)
implementation(
'org.jetbrains:annotations:24.0.1',
'org.projectlombok:lombok:1.18.28',
'com.google.guava:guava:30.0-jre'
)
testImplementation(
'com.opencsv:opencsv:5.6',
'org.apache.poi:poi:3.17'
)
testRuntimeOnly(
"org.junit.platform:junit-platform-launcher:1.7.2",
"org.junit.vintage:junit-vintage-engine:5.7.2")
}
task cucumberCli() {
dependsOn assemble, testClasses
doLast {
javaexec {
main = "io.cucumber.core.cli.Main"
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
args = [
'--plugin', 'pretty',
'--plugin', 'html:target/cucumber-report.html',
'--glue', 'ru.egor.qa.selenidetest.steps',
'src/test/resources']
}
}
}
test {
useJUnitPlatform()
scanForTestClasses = false
}