199 lines
5.8 KiB
Groovy
199 lines
5.8 KiB
Groovy
plugins {
|
|
// Apply the java plugin to add support for Java
|
|
id 'java'
|
|
|
|
// Apply the application plugin to add support for building an application
|
|
id 'application'
|
|
}
|
|
|
|
// Define the main class for the application
|
|
mainClassName = 'org.reso.commander.Main'
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
repositories {
|
|
// Use jcenter for resolving your dependencies.
|
|
// You can declare any Maven/Ivy/file repository here.
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.google.guava:guava:28.2-jre'
|
|
|
|
compile 'commons-cli:commons-cli:1.4'
|
|
|
|
compile 'org.apache.logging.log4j:log4j-api:2.13.0'
|
|
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.13.0'
|
|
compile 'org.apache.logging.log4j:log4j-1.2-api:2.13.0'
|
|
compile 'org.apache.logging.log4j:log4j-core:2.13.0'
|
|
|
|
compile 'org.apache.olingo:odata-client-api:4.7.1'
|
|
compile 'org.apache.olingo:odata-commons-core:4.7.1'
|
|
compile 'org.apache.olingo:odata-client-core:4.7.1'
|
|
|
|
compile 'io.rest-assured:rest-assured:4.2.0'
|
|
compile 'io.rest-assured:json-path:4.2.0'
|
|
compile 'io.rest-assured:json-schema-validator:4.2.0'
|
|
|
|
compile 'io.cucumber:cucumber-java8:5.4.0'
|
|
compile 'io.cucumber:cucumber-junit:5.4.0'
|
|
|
|
compile 'net.masterthought:cucumber-reporting:5.1.1'
|
|
|
|
compile 'com.networknt:json-schema-validator:1.0.35'
|
|
|
|
implementation 'org.mockito:mockito-core:3.3.3'
|
|
|
|
}
|
|
|
|
configurations {
|
|
cucumberRuntime {
|
|
extendsFrom compile
|
|
}
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes(
|
|
'Class-Path': configurations.compile.collect { it.getName() }.join(' '),
|
|
'Main-Class': 'org.reso.commander.App'
|
|
)
|
|
}
|
|
|
|
// generate "fat jar" by default
|
|
from {
|
|
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
}
|
|
|
|
// don't suppress warnings or deprecation notices
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << '-Xlint:unchecked'
|
|
options.deprecation = true
|
|
}
|
|
|
|
|
|
// task for Web API Server 1.0.2 Gold Testing
|
|
task testWebApiServer_1_0_2_Gold() {
|
|
dependsOn jar
|
|
doLast {
|
|
javaexec {
|
|
main = "io.cucumber.core.cli.Main"
|
|
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
|
systemProperties = System.getProperties()
|
|
args = [
|
|
'--strict',
|
|
'--plugin',
|
|
'pretty',
|
|
'--plugin',
|
|
'json:build/web-api-server-1.0.2.gold.json',
|
|
'--plugin',
|
|
'html:build/web-api-server-1.0.2.gold.html',
|
|
'--glue',
|
|
'org.reso.certification.stepdefs#WebAPIServer_1_0_2',
|
|
'src/main/java/org/reso/certification/features/web-api',
|
|
'--tags',
|
|
(systemProperties.get('cucumber.filter.tags', '').toString().trim().length() > 0
|
|
? 'not @platinum and ' + systemProperties.get('cucumber.filter.tags') : 'not @platinum')
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
// task for Web API Server 1.0.2 Platinum Testing - currently equivalent to all, but generates a platinum-named report.
|
|
task testWebApiServer_1_0_2_Platinum() {
|
|
dependsOn jar
|
|
doLast {
|
|
javaexec {
|
|
main = "io.cucumber.core.cli.Main"
|
|
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
|
systemProperties = System.getProperties()
|
|
args = [
|
|
'--strict',
|
|
'--plugin',
|
|
'pretty',
|
|
'--plugin',
|
|
'json:build/web-api-server-1.0.2.platinum.json',
|
|
'--plugin',
|
|
'html:build/web-api-server-1.0.2.platinum.html',
|
|
'--glue',
|
|
'org.reso.certification.stepdefs#WebAPIServer_1_0_2',
|
|
'src/main/java/org/reso/certification/features/web-api'
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
// task for Data Dictionary 1.5
|
|
task testDataDictionary_1_5() {
|
|
dependsOn jar
|
|
doLast {
|
|
javaexec {
|
|
main = "io.cucumber.core.cli.Main"
|
|
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
|
systemProperties = System.getProperties()
|
|
args = [
|
|
'--strict',
|
|
'--plugin',
|
|
'pretty',
|
|
'--plugin',
|
|
'json:build/data-dictionary-1.5.json',
|
|
'--plugin',
|
|
'html:build/data-dictionary-1.5.html',
|
|
'--glue',
|
|
'org.reso.certification.stepdefs#DataDictionary',
|
|
'src/main/java/org/reso/certification/features/data-dictionary',
|
|
'--tags',
|
|
(systemProperties.get('cucumber.filter.tags', '').toString().trim().length() > 0
|
|
? '@DD1.5 and ' + systemProperties.get('cucumber.filter.tags') : '@DD1.5')
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
// task for Data Dictionary 1.6
|
|
task testDataDictionary_1_6() {
|
|
dependsOn jar
|
|
doLast {
|
|
javaexec {
|
|
main = "io.cucumber.core.cli.Main"
|
|
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
|
systemProperties = System.getProperties()
|
|
args = [
|
|
'--strict',
|
|
'--plugin',
|
|
'pretty',
|
|
'--plugin',
|
|
'json:build/data-dictionary-1.6.json',
|
|
'--plugin',
|
|
'html:build/data-dictionary-1.6.html',
|
|
'--glue',
|
|
'org.reso.certification.stepdefs#DataDictionary',
|
|
'src/main/java/org/reso/certification/features/data-dictionary',
|
|
'--tags',
|
|
(systemProperties.get('cucumber.filter.tags', '').toString().trim().length() > 0
|
|
? '@DD1.6 and ' + systemProperties.get('cucumber.filter.tags') : '@DD1.6')
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|
|
//used for internal Commander testing
|
|
test {
|
|
dependsOn assemble, compileTestJava
|
|
doLast {
|
|
javaexec {
|
|
main = "io.cucumber.core.cli.Main"
|
|
systemProperties = System.getProperties()
|
|
classpath = configurations.cucumberRuntime + sourceSets.main.output + sourceSets.test.output
|
|
args = ['--strict',
|
|
'--plugin',
|
|
'pretty',
|
|
'--glue',
|
|
'org.reso.commander.test.stepdefs',
|
|
'src/test/java/org/reso/commander/test/features'
|
|
]
|
|
}
|
|
}
|
|
}
|