Class BMNGRunner

  • All Implemented Interfaces:
    org.testng.IHookable, org.testng.ITestNGListener

    public class BMNGRunner
    extends BMNGAbstractRunner
    A TestNG runner class which can be subclassed by a test class in order to inherit the ability to process @BMRule and @BMScript annotations.
    • Constructor Summary

      Constructors 
      Constructor Description
      BMNGRunner()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void 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.
      void bmngAfterTest​(java.lang.reflect.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 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.
      void bmngBeforeTest​(java.lang.reflect.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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BMNGRunner

        public BMNGRunner()
    • Method Detail

      • bmngBeforeClass

        @BeforeClass(alwaysRun=true)
        public void bmngBeforeClass()
                             throws java.lang.Exception
        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:
        java.lang.Exception - if the test cannot be run
      • bmngAfterClass

        @AfterClass(alwaysRun=true)
        public void bmngAfterClass()
                            throws java.lang.Exception
        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:
        java.lang.Exception - if cleanup fails
      • bmngBeforeTest

        @BeforeMethod(alwaysRun=true)
        public void bmngBeforeTest​(java.lang.reflect.Method method)
                            throws java.lang.Exception
        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 class BMNGAbstractRunner
        Parameters:
        method - the test method about to be run
        Throws:
        java.lang.Exception - if the test cannot be run
      • bmngAfterTest

        @AfterMethod(alwaysRun=true)
        public void bmngAfterTest​(java.lang.reflect.Method method)
                           throws java.lang.Exception
        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 class BMNGAbstractRunner
        Parameters:
        method - the test method about to be run
        Throws:
        java.lang.Exception - if cleanup fails