Package org.jboss.byteman.contrib.bmunit
Class BMNGRunner
java.lang.Object
org.jboss.byteman.contrib.bmunit.BMNGAbstractRunner
org.jboss.byteman.contrib.bmunit.BMNGRunner
- All Implemented Interfaces:
org.testng.IHookable
,org.testng.ITestNGListener
A TestNG runner class which can be subclassed by a test class in order to inherit the
ability to process @BMRule and @BMScript annotations.
-
Field Summary
Fields inherited from class org.jboss.byteman.contrib.bmunit.BMNGAbstractRunner
classConfigAnnotation, classMultiRuleAnnotation, classMultiScriptAnnotation, classSingleRuleAnnotation, classSingleScriptAnnotation, currentClazz
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to the subclass are unloaded automatically after executing all of its test methods.void
bmngAfterTest
(Method method) method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to a test method are unloaded automatically before executing the method.void
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to the subclass are loaded automatically before executing any of its test methods.void
bmngBeforeTest
(Method method) method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to a test method are unloaded automatically before executing the method.Methods inherited from class org.jboss.byteman.contrib.bmunit.BMNGAbstractRunner
bmngAfterClass, bmngBeforeClass, run, switchClass
-
Constructor Details
-
BMNGRunner
public BMNGRunner()
-
-
Method Details
-
bmngBeforeClass
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to the subclass are loaded automatically before executing any of its test methods.- Throws:
Exception
- if the test cannot be run
-
bmngAfterClass
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to the subclass are unloaded automatically after executing all of its test methods.- Throws:
Exception
- if cleanup fails
-
bmngBeforeTest
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to a test method are unloaded automatically before executing the method.- Overrides:
bmngBeforeTest
in classBMNGAbstractRunner
- Parameters:
method
- the test method about to be run- Throws:
Exception
- if the test cannot be run
-
bmngAfterTest
method inherited by a subclass and recognized by TestNG which ensures that Byteman rules specified using @BMRule or @BMScript annotations attached to a test method are unloaded automatically before executing the method.- Overrides:
bmngAfterTest
in classBMNGAbstractRunner
- Parameters:
method
- the test method about to be run- Throws:
Exception
- if cleanup fails
-