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

    JUnit @BeforeClass @Before and Alpha5

    dashy

      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

          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..