СС
Size: a a a
СС
a
СС
a
SB
N
AD
N
M
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.3.50'
id "org.openapi.generator" version '4.1.2'
id 'io.qameta.allure' version '2.8.1'
}
group ‘//‘
version '1.0-SNAPSHOT'
targetCompatibility = 1.8
sourceCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
ext {
selenideVersion = '5.3.1'
cucumberversion = '4.7.4'
}
dependencies {
implementation 'io.cucumber:cucumber-java:4.7.4'
implementation 'io.qameta.allure:allure-cucumber4-jvm:2.13.0'
compile "org.slf4j:slf4j-api:1.7.28"
compile "org.slf4j:slf4j-simple:1.7.28"
testCompile 'junit:junit:4.12'
testCompile group: 'org.testng', name: 'testng', version: '7.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "com.codeborne:selenide:${selenideVersion}"
implementation group: 'com.mashape.unirest', name: 'unirest-java', version: '1.4.9' //delete
implementation 'org.jtwig:jtwig-core:5.87.0.RELEASE'
implementation 'com.google.code.gson:gson:2.8.5'
implementation "io.gsonfire:gson-fire:1.8.3"
implementation 'com.squareup.okhttp3:okhttp:3.14.2'
implementation "com.squareup.okhttp3:logging-interceptor:3.14.2"
implementation 'io.swagger:swagger-annotations:1.5.22'
implementation "com.google.code.findbugs:jsr305:3.0.2"
implementation "org.apache.commons:commons-lang3:3.9"
implementation "org.threeten:threetenbp:1.3.8"
implementation "javax.annotation:jsr250-api:1.0"
testImplementation "io.cucumber:cucumber-java8:${cucumberversion}"
testImplementation "io.cucumber:cucumber-testng:${cucumberversion}"
}
openApiGenerate {
generatorName = "java"
inputSpec = "$projectDir/src/test/kotlin/helpers/api/apiSpec/api-v1.0.yaml".toString()
outputDir = "$projectDir".toString()
apiPackage = "kz.btsd.dm.smarttoi.autotestui.smarttoi-integration-tests.test.helpers.api.autogeneratorClient"
packageName = "kz.btsd.dm.smarttoi.autotestui.smarttoi-integration-tests.test.helpers.api.autogeneratorClient.controller"
invokerPackage = "kz.btsd.dm.smarttoi.autotestui.smarttoi-integration-tests.test.helpers.api.autogeneratorClient.invoker"
modelPackage = "kz.btsd.dm.smarttoi.autotestui.smarttoi-integration-tests.test.helpers.api.autogeneratorClient.dto"
validateSpec = true
configOptions = [
hideGenerationTimestamp: true,
dateLibrary : "java8"
]
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '11'
apiVersion = '1.3'
languageVersion = '1.3'
}
}
compileTestKotlin {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '11'
apiVersion = '1.3'
languageVersion = '1.3'
}
tasks.openApiGenerate
}
allure {
autoconfigure = false
aspectjweaver = true
version = '2.8.1'
clean = true
resultsDir = file("build/allure-results")
reportDir = file("build/allure-report")
// downloadLinkFormat = 'https://dl.bintray.com/qameta/maven/io/qameta/allure/allure-commandline/%s/allure-commandline-%<s.zip'
}
gradle.startParameter.continueOnFailure = true
test {
useTestNG()
}
@After
fun afterScenario() {
screenshot()
Selenide.clearBrowserLocalStorage()
Selenide.clearBrowserCookies()
}
@Attachment(type = "image/png")
fun screenshot(): ByteArray? {
val screenshot = Screenshots.takeScreenShotAsFile()
M
A
A
M
A
A
M
M
A
Configuration.screenshots = false;
M
Configuration.screenshots = false;
ВБ