Skip to content

Instantly share code, notes, and snippets.

@KrishnB
Created August 17, 2018 07:51
Show Gist options
  • Save KrishnB/6a67bb9f96b11df50cccea39e34dac6f to your computer and use it in GitHub Desktop.
Save KrishnB/6a67bb9f96b11df50cccea39e34dac6f to your computer and use it in GitHub Desktop.
Fragmentation task
def runDeviceFragmentation(List<String> udidList) {
def size = udidList.size()
println "Total devices -- " + size
GParsPool.withPool(size) {
udidList.eachParallel { String udid ->
project.javaexec {
main = "cucumber.api.cli.Main"
classpath = optimusExtension.classpath
args = ["-p", "pretty", "-p", ("json:${reportingExtension.baseDir}/cucumber/" + updateReportFileName(udid) + ".json"), "--glue", "steps", "-t", "@sampleTag",
"${project.projectDir}/src/test/resources/features"];
ignoreExitValue = true
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment