Created
October 13, 2021 08:13
-
-
Save krmahadevan/ff7dc7e49c60836a635b8fe8a43c7cb8 to your computer and use it in GitHub Desktop.
A Sample Gradle build file that configures TestNG to be run as a custom task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This file was generated by the Gradle 'init' task. | |
* | |
* This is a general purpose Gradle build. | |
* Learn more about Gradle by exploring our samples at https://docs.gradle.org/7.2/samples | |
*/ | |
plugins { | |
id 'java' | |
id 'idea' | |
} | |
group 'com.rationaleemotions' | |
version '1.0.0-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
// https://mvnrepository.com/artifact/org.testng/testng | |
testImplementation 'org.testng:testng:7.4.0' | |
} | |
task testngTest(type: JavaExec, dependsOn: [classes]) { | |
group 'Verification' | |
description 'Run' | |
mainClass = 'org.testng.TestNG' | |
args('src/test/resources/suite.xml', '-reporter', | |
'org.testng.reporters.XMLReporter:generateTestResultAttributes=true,generateGroupsAttribute=true' | |
) | |
classpath = sourceSets.test.runtimeClasspath | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment