addressalign-toparrow-leftarrow-leftarrow-right-10x10arrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1languagelaunch-new-window--smalllight-bulblightning-boltlinklocation-pinlockm-swarmSearchmailmediummessagesminusmobilemoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstar-shapestartickettrashtriangle-downtriangle-uptwitteruserwarningyahooyoutube

Re: [ruby-81] Re: Pros + cons of various testing frameworks...

From: Member ID: #.
Sent on: Monday, August 24, 2009, 9:15 AM
On Sun, Aug 23, 2009 at 3:06 PM, Steve Midgley<[address removed]> wrote:
> Whatever framework you decide to use, one tip that might be helpful in
> building legacy tests, is to start with your "smoke tests." You could build
> a lot of: "Given this set of parameters, this GET request should return
> 200-Ok, and in the resulting HTML there should be an input tag with this
> value." This sets some a baseline harness around your system to define it's
> behavior in the most fundamental way (these parameters in, this html out).
>
> It's not the ideal way to build TDD from the ground up, but I've found it
> can help to give you some control over your overall environment, so that as
> you change code, you can be confident that your major functionality hasn't
> just failed.

Yes, this is a very good point.  If you really must write tests for
your existing code, start with some high-level 'happy path' tests of
the flow of your external user interface.  This can avoid the catch-22
of lower-level unit tests forcing you to refactor when you don't have
any tests to catch bugs.

-- Chad

People in this
group are also in: