I've looked through the documentation and countless examples, but all of them point to setting it in Maven. I want to set it when using gradle to run the tests. Below is my test task I have set in my build.gradle. By default it runs all smoke tests on a build, but I can pass in whatever group variation I want but I can't generate tests attributes no matter what I try.
test {
useTestNG() {
//run classes in parallel, thread count limited by processor.
options {
parallel = 'classes'
threadCount = Runtime.runtime.availableProcessors()
}
listeners << 'com.automation.listeners.TestNgListener'
//sets the default group to run as smoke.*, .* is wildcard.
includeGroups System.getProperty('groups', 'smoke.*')
excludeGroups System.getProperty('excludeGroups', 'exclude')
}
//we want display the following test events
testLogging {
events "PASSED", "FAILED", "SKIPPED"
}
reports.html.enabled = false
}
Aucun commentaire:
Enregistrer un commentaire