0 Replies Latest reply on Jul 7, 2014 4:28 PM by bsanders1979

    Client & Container tests w/ Graphene

    bsanders1979

      Greetings,

      This is sort of related to another discussion I started, but not exactly the same thing. I am following the instructions at http://arquillian.org/guides/functional_testing_using_graphene/. It clearly states that you can mix client/container tests in a single class, but I am running into issues. Maybe I'm missing something, but it seems like mixing the tests is practically useless. I've noticed a trend with the docs that mention mixing, but really don't provide any samples. Here's my class:

       

      @SpringWebConfiguration

      public class TestLoginViewModel extends Arquillian {

       

        @Autowired

        private LoginViewModel loginViewModel;

       

        @Autowired

        private UserDao userDao;

       

        @Autowired

        protected MessageController msg;

       

        @Drone

        private WebDriver browser;

       

        @ArquillianResource

        private URL contextPath;

       

        @Deployment

        public static WebArchive createArchive() {

          ...

          return archive;

        }

       

        @Test

        public void testAuthentication() {

        }

       

        @Test

        @RunAsClient

        public void testClientAuthentication() {

        }

      }

       

      With the code set like this, I get an error about not being able to inject the URL from the container side (See: ARQ-540). I found a response from Aslak Knutsen where he mentions declaring the client-side method like so:

      ...

        @Test

        @RunAsClient

        public void testClientAuthentication(@ArquillianResource URL contextPath) {

        }

      ...


      However, I get a message about the method expecting 1 param, but got 0 and then a message about a callable being in the Drone context. Little help here would be much appreciated. Thanks.