-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle
40 lines (37 loc) · 1.56 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
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.4/samples
*/
// add java plugin
plugins {
id 'java'
id("io.qameta.allure") version "2.11.2"
}
// Repository Source Configuration
repositories {
mavenCentral() // Using the maven central repository source
}
dependencies {
testImplementation 'io.rest-assured:rest-assured:5.3.2' // add rest-assured dependencies
testImplementation 'org.testng:testng:7.8.0' // Add test framework TestNG dependency
implementation 'org.uncommons:reportng:1.1.4' // testng report dependency
implementation 'org.slf4j:slf4j-api:2.0.9' // Add test log dependency
implementation 'org.slf4j:slf4j-simple:2.0.9' // Add test log dependency
implementation group: 'com.google.inject', name: 'guice', version: '7.0.0'
implementation 'io.qameta.allure:allure-testng:2.24.0' // Add allure report dependency
implementation 'io.qameta.allure:allure-rest-assured:2.24.0' // Add allure report dependency
}
// test config
test {
reports.html.required = false // 禁用 HTML 报告生成
reports.junitXml.required = false // 禁用 JUnit XML 报告生成
// Tell Gradle to use TestNG as a testing framework.
useTestNG() {
useDefaultListeners = true
suites 'src/test/resources/testng.xml' // Specify the path to the test suite XML file
}
testLogging.showStandardStreams = true // Output test logs to the console
testLogging.events "passed", "skipped", "failed"
}