Package org.codehaus.groovy.testng
Class TestNgRunner
- java.lang.Object
-
- org.codehaus.groovy.testng.TestNgRunner
-
- All Implemented Interfaces:
GroovyRunner
public class TestNgRunner extends java.lang.Object implements GroovyRunner
Integration code for running TestNG tests in Groovy.
-
-
Constructor Summary
Constructors Constructor Description TestNgRunner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRun(java.lang.Class scriptClass, GroovyClassLoader loader)
Utility method to check via reflection if the parsed class appears to be a TestNG test, i.e.java.lang.Object
run(java.lang.Class scriptClass, GroovyClassLoader loader)
Utility method to run a TestNG test.
-
-
-
Method Detail
-
canRun
public boolean canRun(java.lang.Class scriptClass, GroovyClassLoader loader)
Utility method to check via reflection if the parsed class appears to be a TestNG test, i.e. checks whether it appears to be using the relevant TestNG annotations.- Specified by:
canRun
in interfaceGroovyRunner
- Parameters:
scriptClass
- the class we want to checkloader
- the GroovyClassLoader to use to find classes- Returns:
- true if the class appears to be a test
-
run
public java.lang.Object run(java.lang.Class scriptClass, GroovyClassLoader loader)
Utility method to run a TestNG test.- Specified by:
run
in interfaceGroovyRunner
- Parameters:
scriptClass
- the class we want to run as a testloader
- the class loader to use- Returns:
- the result of running the test
-
-