
Is there an way to have Assert and/or Should not stop if it fails?
Reported by bret (at watircraft) | March 31st, 2009 @ 02:24 PM | in Backlog
---------- Forwarded message ---------- From: cernenus_1 sqapro@gmail.com Date: Mon, Mar 30, 2009 at 12:30 PM Subject: [watir-framework] Is there an way to have Assert and/or Should not stop if it fails? To: watir-framework@yahoogroups.com
I can see how when you are doing outside in development work, you want your stuff to stop at the first step that's not working.
OTOH when you are running a suite of tests for things like regression tests, and you have steps that have multiple validations, e.g. you have
THEN xxxx happens
AND yyyy also happens
BUT I don't see zzzz
it would really be nice in the test results to know the status of the other two items if xxxx fails, especially in cases where xxx failing does not preclude the ability to check on the other two, and even more so in cases where seeing zzzz fail would give you a clue as to what went wrong.
Consider for example a scenario of logging out user a and logging in user b, and you are checking that you don't still see user a logged in. Or a scenario dealing with security and combining permissions of multiple roles where you have multiple validations needed to ensure that the system is giving you the right result of the combined permissions.
That or if it can't proceed to the other tests, it would be nice to report them as 'blocked' so we know that it's not that they failed or passed, but that we don't KNOW their status because we couldn't get there.
Comments and changes to this ticket
-
bret (at watircraft) March 31st, 2009 @ 02:26 PM
- State changed from new to open
This is a good suggestion. We've had people ask about this before. As a comparison, the "verify" method in Watir::TestSuite provides this functionality.
-
bret (at watircraft) March 31st, 2009 @ 04:23 PM
- Assigned user set to bret (at watircraft)
-
bret (at watircraft) April 7th, 2009 @ 12:13 AM
- Milestone set to Backlog
Moving to backlog. Note that this won't be easy, and therefore probably won't be done soon.
-
Chuck van der Linden April 8th, 2009 @ 04:06 PM
Potentially I wonder if perhaps this is better raised with the Rspec/Cucumber folks?? since we'd be talking about changing the basic way that .should operates.
-
bret (at watircraft) April 8th, 2009 @ 04:27 PM
You are welcome to bring it up with the Rspec folks. It would require changing the way "should" works.
One alternate idea i've considered would be to create a new modal verb -- maybe "shall" -- and attach the new behavior to it.
Bret
-
bret (at watircraft) April 22nd, 2009 @ 11:29 PM
You've raised this issue before and we've discussed it on this ticket. http://watircraft.lighthouseapp....
It would probably take me a couple of hours to research this and determine whether it would be hard or not.
Bret
On Wed, Apr 22, 2009 at 7:05 PM, chuckvdl sqapro@gmail.com wrote:
Is there a way that the framework could provide us with an alternative to .should that is similar to the 'verify' alternative that watir provides for 'assert'?
Something that would work like .should does, e.g. with the matchers and read nicely to make very clearly worded steps and tests? But would also keep going and do any other following validations in the same test? (and work with cucumber and rspec)
I I can't think of a really good name, the best I can come up with would be .ought , .oughtto , or .ought_to
Then again, I suppose in the spirit of my wife's detesting it when she finds the word 'should' in specs ("it should? well when shouldn't it? when wouldn't it? what happens if it doesn't?") I ought perhaps suggest the use of '.will' to indicate the behavior expectation is in no way fuzzy..
Yeah, I guess that works.. lets see
browser.element(attrib, 'value').will exist
yes, that's pretty clear isn't it?
would that be an easy doable thing, or a major non-trivial undertaking?
Yahoo! Groups Links
<*> To visit your group on the web, go to: http://groups.yahoo.com/group/wa...
<*> Your email settings: Individual Email | Traditional
<*> To change settings online go to: http://groups.yahoo.com/group/wa... (Yahoo! ID required)
<*> To change settings via email: mailto:watir-framework-digest@yahoogrou... mailto:watir-framework-fullfeatured@yah...
<*> To unsubscribe from this group, send an email to: watir-framework-unsubscribe@yaho...
<*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
-- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog http://www.io.com/%257Ewazmo/blog Twitter, www.twitter.com/bpettichord GTalk: bpettichord@gmail.com
Ask Me About Watir Training www.watircraft.com/training
-- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com
Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord GTalk: bpettichord@gmail.com
Ask Me About Watir Training www.watircraft.com/training
-
Bret Pettichord June 11th, 2009 @ 09:00 PM
- Assigned user changed from bret (at watircraft) to Bret Pettichord
[responsible:ID#38130 bulk edit command]
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A framework for web testing.
People watching this ticket
- Nobody is watching this ticket.
Referenced by
-
2 Is there an way to have Assert and/or Should not stop if it fails? You've raised this issue before and we've discussed it on...