Index: ssts-selenium-test/build.gradle =================================================================== diff -u -r17597 -r17607 --- ssts-selenium-test/build.gradle (.../build.gradle) (revision 17597) +++ ssts-selenium-test/build.gradle (.../build.gradle) (revision 17607) @@ -8,7 +8,46 @@ } +test { + // enable TestNG support (default is JUnit) + useTestNG(){ + //outputDirectory = file("$project.buildDir//testngOutput") + //report generation delegated to TestNG library: + useDefaultListeners = true + //suites 'src/test/resources/test/forgon/AllTests.xml' + } + //reports.html.enabled = false + ignoreFailures = true //use this to allow build to continue for CI purposes + + // set a system property for the test JVM(s) + // 设置文件编码为UTF-8,基础数据准备的json文件中有中文 + systemProperty "file.encoding", "utf-8" + // explicitly include or exclude tests + //include 'test/forgon/**' + //exclude 'org/boo/**' + + // show standard out and standard error of the test JVM(s) on the console + testLogging.showStandardStreams = true + + // set heap size for the test JVM(s) + minHeapSize = "128m" + maxHeapSize = "2048m" + + // set JVM arguments for the test JVM(s) + jvmArgs '-XX:MaxPermSize=512m -XX:MaxNewSize=512m' + + // listen to events in the test execution lifecycle + beforeTest { descriptor -> + logger.lifecycle("Running test: " + descriptor) + } + + // listen to standard out and standard error of the test JVM(s) + onOutput { descriptor, event -> + logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message ) + } +} + dependencies { // https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server