Sure click testing works the first time you do something, but the next
time you change something and want to test things again, you have to
remember all the states and workflows you used, which is hard/
impossible.  With automated testing (either unit tests or something
like selenium) you don't have to remember, the computer knows how
things should work.

While I can totally understand not having the time to write tests for
every part of a small application, you should most certainly write
tests for important parts of an application.  And anything large that
you want to depend on should have tests. For example if CakePHP didn't
have the thousands of tests it has, it would be impossible to ensure
that api's and usage wasn't broken on each change.  As for finding
tutorials on how to test, there are a few videos on tv.cakephp.org
about testing, and there are countless books written about unit
testing.  Kent Beck has written several and all the ones I've read
have been excellent.

I don't think I can stress how important writing tests are if you plan
on having a system that you need to actively maintain. Having worked
on largish applications both with and without tests, the ones with
were far easier to work with.

-Mark



On Jan 8, 10: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.organdhelpothers 
> > > > 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 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] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to