[Java] Class TestNgRunner
- org.apache.groovy.plugin.testng.TestNgRunner
- All Implemented Interfaces and Traits:
- GroovyRunner
public class TestNgRunner
Integration code for running TestNG tests in Groovy.
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
public boolean |
canRun(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. | |
public Object |
run(Class<?> scriptClass, GroovyClassLoader loader) Utility method to run a TestNG test. |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail
@Override public boolean canRun(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.
- 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
@Override public Object run(Class<?> scriptClass, GroovyClassLoader loader)
Utility method to run a TestNG test.
- Parameters:
-
scriptClass
- the class we want to run as a test -
loader
- the class loader to use
- Returns:
- the result of running the test
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/apache/groovy/plugin/testng/TestNgRunner.html