1 Reply Latest reply on Mar 21, 2011 5:55 AM by Aslak Knutsen

    JUnit @BeforeClass @Before and Alpha5

    dashy Newbie

      Hi,

      after upgrading to Alpha5.

      The @Before and @BeforeClass Annotations of my JUnit TestCasses

      are not executed anymore.

       

      Is this desired ?

       

      thx,

      Leopold Odenthal

        • 1. JUnit @BeforeClass @Before and Alpha5
          Aslak Knutsen Master

          Before/After are now only executed in-conainer, not on the client side. Based on a glitch in the implementation, they are not executed at all when using embedded containers like weld-se|ee or openejb. https://issues.jboss.org/browse/ARQ-56

           

          With support for multiple containers and mixed runmodes, we need to have better support for how to mark/execute the Before/After methods:

          https://issues.jboss.org/browse/ARQ-351

           

          e.g.

           

          @Before @OprateOnContainer("x")

          public void setupInContainerX() {}

           

          @Before @OprateOnContainer("x") @RunAsClient

          public void setupInContainerXIfTestIsExecutedAsClient() {}

           

          But this needs some filtering integration with the testframework that we're not 100% sure how to yet..