-
1. Re: Warp: API proposal for complex executions
aslak Oct 23, 2012 7:39 AM (in response to lfryc)Cool stuff, just a few questions.
Will there be a no arg v of group following the registration order?
group().verify(); result.getGroup(0) or result.getGroups().get(0)
Will there be support for multiple ServerAssertions?
execute(ca).verify(sa1, sa2)
Is order guaranteeded between registration and verification? e.g. multiple filters matching the same, are their verify pair executed in order?
Is there a group associated with a 'non grouped' api call? e.g. Would something like this work:
WarpResult result = Warp.execute(ca).verify(sa).verifyAll();
(getting hold of the WarpResult object without defining a Group)
Any thoughts on a simple declerative version of the API. If you're only doing one request within the Test body, or multiple that require the same assertions.
@Test @Warp(assertion = VerifyXYZ.class, filter = JSFRequest.class) public void should() { driver.open(xyz); }
-
2. Re: Warp: API proposal for complex executions
lfryc Oct 25, 2012 3:51 AM (in response to aslak)Thanks for feedback, Aslak.
Aslak Knutsen wrote:
Cool stuff, just a few questions.
Will there be a no arg v of group following the registration order?
group().verify(); result.getGroup(0) or result.getGroups().get(0)
Will there be support for multiple ServerAssertions?
execute(ca).verify(sa1, sa2)
Yes, group() syntax with no key will be surely allowed, using sequence numbering.
Multiple assertions is great idea, I will definitely do that, preserving order of registration/verification.
Is there a group associated with a 'non grouped' api call? e.g. Would something like this work:
WarpResult result = Warp.execute(ca).verify(sa).verifyAll();
(getting hold of the WarpResult object without defining a Group)
Definitely there will be group associated with default call (DefaultExecutionGroup.KEY), but I would not overload verify(sa) method,
rather use something like
Warp.execute(ca).verifyAndReturnResult(sa);
Any thoughts on a simple declerative version of the API. If you're only doing one request within the Test body, or multiple that require the same assertions.
@Test @Warp(assertion = VerifyXYZ.class, filter = JSFRequest.class) public void should() { driver.open(xyz); }
Great idea.
@Test @Verify(VerifyXYZ.class) @Filters(JSFRequest.class) public void should() { driver.open(xyz); }
@Test @Filters(JSFRequest.class) public void should() { Warp.execute(ca).verify(VerifyXYZ.class); }