7 Replies Latest reply on Apr 16, 2019 7:20 PM by Richard Achmatowicz

    Using BYTEMAN in JUnit test with Arquillian

    Tommasso Borgato Newbie

      Hi All,

      I am trying to use BYTEMAN on the client side in a test run with Arquillian:

       

      @RunWith(Arquillian.class)

       

      So I cannot add:

       

      @RunWith(BMUnitRunner.class)

       

      What I am trying to do is to mimic what happens inside class BMUnitRunner.

       

      BMUnitConfigState.pushConfigurationState(
                        MyTestCase.class.getAnnotation(BMUnitConfig.class)
                      , MyTestCase.class);
      BMUnit.loadScriptFile(
                        MyTestCase.class
                      , BMRunnerUtil.computeBMScriptName(MyTestCase.class.getAnnotation(BMScript.class).value())
                      , BMRunnerUtil.normaliseLoadDirectory(MyTestCase.class.getAnnotation(BMScript.class)));

       

      My test class is annotated:

       

      @RunWith(Arquillian.class)
      @BMUnitConfig(loadDirectory="target/test-classes")
      @BMScript(value="bytemarules.btm")
      public class CMyTestCase 

       

      and the script file is loaded but the rules are not executed!