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 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
>

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