4 Replies Latest reply on Sep 15, 2014 2:05 PM by jmbarone

    Errai Testing

    jmbarone

      Hi Everybody!

       

      I want to know what method is better to test Errai apps and if it exists some documentation about it.

       

      Now i'm trying with junit (selenium style) and AbstractErraiCDITest base tests ... so i see the gwtmockito way ... however, i like to "hear" opinions about how to do it in the "errai way".

       

      Thanks.

        • 1. Re: Errai Testing
          ddadlani

          Hi Jose,

           

          There is no official way to test Errai apps. It really depends on what works best for you.

           

          Most of the tests for the Errai framework are based on GWTTestCase, which is basically JUnit testing that is specialized for the GWT environment.

          You can take a look at these tests at errai/errai · GitHub for your reference.

           

          Cheers,
          Divya.

          • 2. Re: Errai Testing
            jmbarone

            Ok, I see the samples ... but i see samples with CDI or samples with Bus.

             

            How i test a client with cdi and events with a cdi server bean? ...

             

            what kind of test can i do?

             

            - i can test with the original gwt view (injected or something like that in the test class) or i need to mock the view and test only the events?

            - i can test the server bean directly?

             

            Cheers

            • 3. Re: Errai Testing
              ddadlani

              Hello Jose,

               

              You can directly test the server bean just like you would in any CDI app. As an example, many people use Arquillian for this purpose.

               

              Regards,
              Divya

              • 4. Re: Errai Testing
                jmbarone

                Ok, surely Arquillian will be the right move.

                 

                Thanks