4 Replies Latest reply on Apr 16, 2013 3:28 PM by lfryc

    group() breaks Warp

    sewatech

      Hi everybody,

       

      I'm beginning with Warp. The first try was fine, but when adding a group in my test, the activity isn't performed.

       

      I'm testing a simple Servlet which returns a number, and here is my test class :

       

      @RunWith(Arquillian.class)

      @WarpTest

      public class OtherWarpTest {

          @Deployment(testable = true)

          public static Archive<?> deploy() {

              return ShrinkWrap.create(WebArchive.class).addClass(CountServlet.class);

          }

       

          @Drone WebDriver browser;

          @ArquillianResource URL baseUrl;

       

          @Test @RunAsClient

          public void simple_test() {

              Warp.initiate(new Activity() {

                      @Override

                      public void perform() {

                          fail();

                      }

                  })

                  .group().observe(HttpFilters.request().uri().contains("count"))

                              .inspect(new Inspection() {

                                  private static final long serialVersionUID = 1L;

                              });

          }

      }

       

      The test should fail, but it doesn't.

       

      I have Warp 1.0.0.Alpha2, Drone 1.2.0.Alpha1 and Arquillian 1.0.3.Final.

       

      Is there anything wrong in my test, or should I put a specific configuration ? Or is it just a bug ?

       

      Alexis

        • 1. Re: group() breaks Warp
          lfryc

          Hey Alexis,

           

          you need to add .execute() at the end of the Warp group specification as in TestExecutionAPI.java.

           

          In the group specification fluent API, Warp does not have any clue of where your specification ends - thus you need to end a specification and fire a request by .execute().

          • 2. Re: group() breaks Warp
            lfryc

            Btw for observing single request, you don't need group() API.

             

            Note: there was a bug which prevented to use single request execution API with observer() method - ARQ-1291 - it is now fixed.

            • 3. Re: group() breaks Warp
              sewatech

              Thanks Lukáš,

               

              With execute(), groups are working much better.

               

              And I managed to use obseve() without a group with a 1.0.0.Beta1-SNAPSHOT version.

               

              BTW I don't understand the version numbers : latest versions in central alpha2 and 1.0.0.Beta1-SNAPSHOT, but ARQ-1291 is fixed in Alpha3. Is Alpha3 already released ? What will be the next version ?

               

              Alexis

              • 4. Re: group() breaks Warp
                lfryc

                Hey Alexis,

                 

                I have decided to cut a release (Alpha3) which will include some recent community efforts before the actual Beta1.

                 

                The development version will stay 1.0.0.Beta1-SNAPSHOT till Warp reaches Beta1.

                I think about deprecating this snapshot version scheme since it's quite inflexible - we will use 1.1.0-SNAPSHOT instead.