sskorol

UI build module

Sep 2nd, 2022
1,999
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 3.22 KB | None | 0 0
  1. description = "UI"
  2.  
  3. val agent: Configuration by configurations.creating
  4.  
  5. configurations {
  6.     testImplementation {
  7.         extendsFrom(configurations.annotationProcessor.get())
  8.     }
  9. }
  10.  
  11. tasks.compileJava {
  12.     options.compilerArgs.add("-Xplugin:Manifold")
  13. }
  14.  
  15. tasks.compileTestJava {
  16.     options.compilerArgs.add("-Xplugin:Manifold")
  17. }
  18.  
  19. dependencies {
  20.     agent("org.aspectj:aspectjweaver")
  21.  
  22.     implementation(project(":model"))
  23.     implementation(project(":api"))
  24.     implementation("com.codeborne:selenide:6.5.0")
  25.     implementation("io.github.sskorol:cdt-java-client")
  26.     implementation("io.github.sskorol:webdriver-supplier:1.1.3")
  27.     implementation("com.fasterxml.jackson.core:jackson-databind:2.13.3")
  28.     implementation("javax.xml.bind:jaxb-api:2.4.0-b180830.0359")
  29.     // Keep 2.35 version, as 3+ contains breaking changes that would require refactoring
  30.     implementation("org.glassfish.jersey.core:jersey-client:2.35")
  31.     implementation("io.rest-assured:rest-assured")
  32.  
  33.     implementation("org.aeonbits.owner:owner")
  34.     implementation("com.github.ben-manes.caffeine:caffeine")
  35.     implementation("io.qameta.allure:allure-testng") {
  36.         exclude(group = "org.testng", module = "testng")
  37.     }
  38.     implementation("io.github.sskorol:test-data-supplier")
  39.     implementation("org.testng:testng")
  40.     implementation("org.assertj:assertj-core")
  41.     implementation("org.aspectj:aspectjrt")
  42.     implementation("org.aspectj:aspectjweaver")
  43.     implementation("systems.manifold:manifold-ext")
  44.     implementation("systems.manifold:manifold-ext-rt")
  45.     implementation("org.awaitility:awaitility:4.2.0")
  46.  
  47.     compileOnly("com.google.code.findbugs:annotations")
  48.     compileOnly("com.google.code.findbugs:jsr305")
  49.  
  50.     annotationProcessor("systems.manifold:manifold-ext")
  51.     testAnnotationProcessor("systems.manifold:manifold-ext")
  52.     annotationProcessor("org.projectlombok:lombok")
  53.     compileOnly("org.projectlombok:lombok")
  54.     testImplementation("org.projectlombok:lombok")
  55.     testAnnotationProcessor("org.projectlombok:lombok")
  56. }
  57.  
  58. tasks.register<Delete>("cleanRootBuild") {
  59.     delete(rootProject.buildDir)
  60. }
  61.  
  62. tasks.clean {
  63.     dependsOn("cleanRootBuild")
  64. }
  65.  
  66. tasks.test {
  67.     val suiteName = System.getenv("UI_SUITE_NAME") ?: "smoke-suite-ui"
  68.     val jiraUrl = System.getenv("JIRA_URL")
  69.     val jiraIssuePattern = "${jiraUrl}/browse/{}"
  70.  
  71.     systemProperty("selenide.timeout", 15000)
  72.     systemProperty("allure.model.indentOutput", true)
  73.     systemProperty("allure.link.issue.pattern", jiraIssuePattern)
  74.     systemProperty("allure.link.tms.pattern", jiraIssuePattern)
  75.  
  76.     useTestNG {
  77.         listeners.add("io.github.sskorol.listeners.BeforeMethodListener")
  78.         listeners.add("com.plannuh.utils.PageCacheProvider")
  79.         listeners.add("com.plannuh.utils.AttachmentsListener")
  80.         listeners.add("com.plannuh.utils.CDPProvider")
  81.         listeners.add("com.plannuh.assertions.AssertListener")
  82.         suites("src/test/resources/${suiteName}.xml")
  83.     }
  84.  
  85.     doFirst {
  86.         jvmArgs("-javaagent:${agent.singleFile}")
  87.     }
  88. }
  89.  
  90. sonarqube {
  91.     properties {
  92.         properties(
  93.             hashMapOf<String, String>(
  94.                 "sonar.branch" to "ui"
  95.             )
  96.         )
  97.     }
  98. }
  99.  
Advertisement
Add Comment
Please, Sign In to add comment