apply plugin: 'java' apply plugin: 'idea' apply plugin: 'eclipse' repositories { mavenCentral() // mavenRepo urls: 'http://download.java.net/maven/2/' } dependencies { compile "org.seleniumhq.selenium:selenium-java:2.15.0" compile "org.testng:testng:6.3.1" // from http://kaczanowscy.pl/tomek/2009-12/better-looking-test-reports-with-reportng compile ("org.uncommons:reportng:1.1.2") { exclude group: "org.testng", module: "testng" } } test { useTestNG() maxParallelForks = 1 options { listeners << 'my.listeners.MyTestListener' } systemProperties = [ BROWSER: System.getProperty('BROWSER', 'firefox'), ] } task sanity(type: Test) { useTestNG() { includeGroups 'sanity' maxParallelForks = 1 systemProperties = [ BROWSER: System.getProperty('BROWSER', 'firefox') ] options { listeners << 'org.uncommons.reportng.HTMLReporter' listeners << 'org.uncommons.reportng.JUnitXMLReporter' // useDefaultListeners = false } } } task setup(type: Test) { useTestNG() { includeGroups 'setup' maxParallelForks = 1 systemProperties = [ BROWSER: System.getProperty('BROWSER', 'firefox'), ] } } task paas(type: Test) { useTestNG() { includeGroups 'paas' maxParallelForks = 1 systemProperties = [ BROWSER: System.getProperty('BROWSER', 'firefox'), ] } } task deployment(type: Test) { useTestNG() useTestNG() { includeGroups 'deployment' maxParallelForks = 1 systemProperties = [ BROWSER: System.getProperty('BROWSER', 'firefox'), ] } }