Here is very good book for unit testing, i suggest you start reading it
instead of reading tuts or articles in a separated manner:
http://www.limespace.de/wp-content/uploads/2009/12/practical-php-testing.pdf
You can legally use the book and distribute it :)

On Sun, Jan 9, 2011 at 5:13 AM, netusco <[email protected]> wrote:

> thanks! ok you convinced me at least to give it a try.
> I guess what I would like to find is a blog that could explain well
> all the parts needed to develop apps correctly, as I just find things
> here and there and I have to figure out if I need to implement them or
> not. Probably because I never worked for a "boss" in development
>
> On 9 jan, 00:35, nurvzy <[email protected]> wrote:
> > Testing is essential for any application you intend on maintaining or
> > will be passing between developers.
> >
> > In regards to click testing, sure -- test your app yourself, if you
> > only do it once you've saved time by not writing the test.  But now
> > lets say you then refactor a bit/add a new feature.  Well now you need
> > to verify all the stuff that was working before still works.  So you
> > hand test your app again and now you're officially wasting time.  Had
> > you just taken the extra few minutes to script your test you'd always
> > be able to run it anytime you needed to reassure yourself (or your
> > boss/client) that things are working.  Say you make another change,
> > and now you have to go back and test by hand again.  Now you're
> > wasting your time and your boss's/client's money.  Your time is your
> > own to waste, but you won't be in business long if you're in the habit
> > of wasting your boss's money.   By not scripting the tests you'd
> > otherwise do by hand that's exactly what you're doing -- wasting
> > resources.
> >
> > That's not to say 100% coverage is the only way, but certainly test
> > things that have broken before, are key parts of your application, and
> > specs written by your employer/client.  At the end of the day, by
> > testing your app you'll gain more confidence in your app, the fear of
> > refactoring will be gone and you actually have something to show your
> > boss/client that it works the way they specified.
> >
> > Testing isn't a waste of time, *NOT* testing your application is a
> > waste of time.
> >
> > Nick
> >
> > On Jan 8, 8:01 am, netusco <[email protected]> wrote:
> >
> > > thanks, I appreciate the answers and I understand them but seen the
> > > amount of work needed on testing... isn't it faster to just test your
> > > app directly and debug when there's errors on it? I've been doing like
> > > this so far.. But I wonder if I should change that habit.
> >
> > > On 7 jan, 20:06, euromark <[email protected]> wrote:
> >
> > > > you are partly wrong
> >
> > > > for small apps the amount of time needed for complete code coverage
> > > > and full web test cases
> > > > is far too much compared to the value.
> > > > it would be wonderful, but we simply dont have the resources
> >
> > > > so test the stuff that is tested the quickest, test the stuff that
> can
> > > > easily break or go wrong
> > > > thats it, high coverage with low time costs.
> >
> > > > this way you have a tradeoff between those to variables
> > > > and it already helps MORE than not using it at all - even if the time
> > > > to write the tests wasn't that big of a deal.
> > > > as soon as you have more time you can work on the coverage task
> again.
> >
> > > > but testing itself is a must!
> >
> > > > On 7 Jan., 15:52, Joshua Muheim <[email protected]> wrote:
> >
> > > > > Dear netusco
> >
> > > > > I know exactly what you mean - most CakePHP tutorials about testing
> > > > > aren't that great; they expect you already have plenty of ideas on
> why
> > > > > testing is good, and they only explain how in theory you can use
> the
> > > > > SimpleTest library to test your CakePHP apps the same way you have
> > > > > already tested a dozen of apps before with other testing
> frameworks.
> >
> > > > > YOU SHOULD REALLY DO TESTING. That's what I really want to entrust
> to
> > > > > you. But I agree with you: the examples from the cook book aren't
> very
> > > > > authentic. Such fine-grained testing you want to do when you are
> e.g.
> > > > > creating a library that absolutely relies on every part of itself
> and
> > > > > that you have written yourself, so you can't rely on the idea that
> > > > > anybody else has already done the biggest parts of testing for you.
> >
> > > > > When using a good framework like CakePHP, you can rely on exactly
> > > > > that: most of the functionalities are tested and have proven to
> work.
> > > > > So you don't really need to test *everything* in your application,
> if
> > > > > you don't want to, but you should take a pragmatic approach to
> testing
> > > > > it in a way you have a good cost/benefit balance.
> >
> > > > > If you really don't want to much testing, then I suggest you use at
> > > > > least the scriptable browser of SimpleTest. This way you can check
> > > > > with very small effort whether the main parts of your applications
> > > > > work. You can. e.g. script the browser to register as a user, and
> > > > > after changing some parts of your application, you know with a
> single
> > > > > click whether it had any negative influences on the user
> registering
> > > > > part of your app.
> >
> > > > > I don't have time to write any more stuff, but I guess this will
> lead
> > > > > you into the right direction.
> >
> > > > > On Fri, Jan 7, 2011 at 3:25 PM, netusco <[email protected]>
> wrote:
> > > > > > I've been recently wondering wether to use SimpleTest or not...
> so I
> > > > > > thought to ask what does people do. As I'm learning programing
> always
> > > > > > by myself I don't know how others work... but it seems to me that
> > > > > > using cake test for normal little applications is a pain in the
> ass as
> > > > > > for the amount of coding needed. Also to test if a function is
> > > > > > returning correctly the format of an amount in EUR as in one of
> the
> > > > > > cookbook examples it seems to me stupid, as when I code a method
> like
> > > > > > that I try to make shure it gives back the expected result and if
> it
> > > > > > ever brakes is because I had given an invalid value or something
> > > > > > similar...
> >
> > > > > > But I can be totally wrong as I had seen a video of mark
> encoraging to
> > > > > > use testing.
> >
> > > > > > So my question would be wether people use it or not and if people
> use
> > > > > > it only for big app or even for small ones.
> >
> > > > > > thanks!
> >
> > > > > > Check out the new CakePHP Questions
> sitehttp://cakeqs.organdhelpotherswith their CakePHP related questions.
> >
> > > > > > You received this message because you are subscribed to the
> Google Groups "CakePHP" group.
> > > > > > To post to this group, send email to [email protected]
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected]<cake-php%[email protected]>For
> > > > > >  more options, visit this group athttp://
> groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions site http://cakeqs.org and help others
> with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<cake-php%[email protected]>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to