forked from dardodeleon/tatf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (104 loc) · 4.12 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
131
132
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/5.5.1/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id 'java'
// Apply the application plugin to add support for building a CLI application
id 'application'
id 'eclipse'
id 'jacoco'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}
dependencies {
// This dependency is used by the application.
compile 'com.google.guava:guava:27.1-jre'
// Use JUnit test framework
compile 'org.junit.jupiter:junit-jupiter-engine:5.5.1'
compile 'org.junit.jupiter:junit-jupiter-api:5.5.1'
// requerido para usar las anotaciones @ParameterizedTest y @ValueSource
compile 'org.junit.jupiter:junit-jupiter-params:5.5.1'
// nuevas dependencias JUnit para manejar Suites y Runner
compile 'org.junit.platform:junit-platform-suite-api:1.5.2'
compile 'org.junit.platform:junit-platform-runner:1.5.2'
// manejador de webdrivers
compile 'io.github.bonigarcia:webdrivermanager:3.6.2'
// selenium
compile 'org.seleniumhq.selenium:selenium-api:3.141.59'
compile 'org.seleniumhq.selenium:selenium-java:3.141.59'
compile 'org.seleniumhq.selenium:selenium-remote-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-chrome-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-firefox-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-ie-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-safari-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-edge-driver:3.141.59'
compile 'org.seleniumhq.selenium:selenium-opera-driver:3.141.59'
// librería necesaria para loggin de webdriver
compile 'org.slf4j:slf4j-simple:1.6.1'
// librería de assert
compile 'org.assertj:assertj-core:3.13.2'
// librería que aporta útilidades de lenguaje Java
compile 'org.apache.commons:commons-lang3:3.9'
}
application {
// Define the main class for the application
mainClassName = 'uy.com.ces.capacitacion.suites.runner.SuiteRunner'
}
jar {
from {
(configurations.runtime).collect {
it.isDirectory() ? it : zipTree(it)
}
}
manifest {
attributes (
'Main-Class' : 'uy.com.ces.capacitacion.suites.runner.SuiteRunner',
'Build-Timestamp' : new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").format(new Date()),
'Build-JDK' : "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS' : "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
'Project-Title' : project.name,
'Project-Version' : project.version.replace('unspecified', '0.0.'.concat(new java.text.SimpleDateFormat("yyyyMMdd").format(new Date()))),
'JUnit-Version' : project.configurations.compile.dependencies.findAll({it.name.contains("junit-jupiter-api")}).inject([]) { result, entry -> result << entry.version }.join(''),
'Selenium-Version' : project.configurations.compile.dependencies.findAll({it.name.contains("selenium-api")}).inject([]) { result, entry -> result << entry.version }.join('')
)
}
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("$buildDir/jacocoHtml")
}
}
test {
useJUnitPlatform {}
maxParallelForks 4
}
task buildTestReports(type: GradleBuild) {
tasks = ['clean', 'build', 'test', 'jacocoTestReport']
}
task testDev(type: Test) {
useJUnitPlatform {
includeTags 'dev'
}
check.dependsOn it
shouldRunAfter test
}
sourceSets {
main {
resources {
srcDirs = ['../../src/test/resources' ]
}
java {
srcDirs = ['src', 'test']
}
}
}