Package org.apache.groovy.plugin.testng
Class TestNgRunner
java.lang.Object
org.apache.groovy.plugin.testng.TestNgRunner
- All Implemented Interfaces:
- GroovyRunner
- Direct Known Subclasses:
- TestNgRunner
public class TestNgRunner extends java.lang.Object implements GroovyRunner
Integration code for running TestNG tests in Groovy.
- 
Constructor SummaryConstructors Constructor Description TestNgRunner()
- 
Method SummaryModifier and Type Method Description booleancanRun(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.Objectrun(java.lang.Class<?> scriptClass, GroovyClassLoader loader)Utility method to run a TestNG test.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
- 
Constructor Details- 
TestNgRunnerpublic TestNgRunner()
 
- 
- 
Method Details- 
canRunUtility 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:
- canRunin interface- GroovyRunner
- Parameters:
- scriptClass- the class we want to check
- loader- the GroovyClassLoader to use to find classes
- Returns:
- true if the class appears to be a test
 
- 
runUtility method to run a TestNG test.- Specified by:
- runin interface- GroovyRunner
- Parameters:
- scriptClass- the class we want to run as a test
- loader- the class loader to use
- Returns:
- the result of running the test
 
 
-