2 Replies Latest reply on Sep 23, 2011 7:59 AM by micka33

    Arquillian and @Before and @After annotations

    micka33

      Hi all,

      As a newbee, I am struggling with a little problem running my tests with Arquillian in the as-client Mode with jUnit 4.

      I can't get my setup and teardown methods executed, (decorated with classic @Before and @After annotations).

       

      Basically my code looks like this

       

      @RunWith(Arquillian.class)

      public class FunctionnalTestAdvices {

       

      @Deployment(testable = false)

          public static JavaArchive createTestArchive() {

              return ShrinkWrap.create(JavaArchive.class, "test.jar")

              .addClasses(...);

           }

       

      @Test

          public void someTest() {

              ...

          }

       

      @Before

          public void setup() {

              doBeforeTest(); //never gets executed

          }

       

      @After

          public void tearDown()  {

              doAfterTest(); //never gets executed

          }

       

      }

       

      Are this methods supported by the Arquillian runner ?

       

      Any help or insights would be appreciated.

       

      Thanks,