Following on from Erwin Moller's message. . .
>su******@gmail.com wrote:
>Please let me know how do we effectively and quickly test a php code ?
Short question.
Difficult to answer.
It completely depends on your requirements.
You can judge the code by:
- security (header/email-injection, sql-injection, loginlogic)
- functionality: Does the code produce what you want, also if you feed it
information designed to confuse it.
- Codingstyle: Can a PHP programmer easily read through the code? Does it
have some comments to explain what is going on? If you use a database, is
it designed neat and smart?
- stresstesting: Do you expect a lot a concurent hits, and is the setup on
your machine capable of handling that? (Of course it is up to you to set
the minimum)
etc.
So what is it you want?
I think it is safe to say you need an experienced PHP programmer to judge
any of the above (except the stresstesting maybe).
Regards,
Erwin Moller
Yes. "debug" and "test" are entirely different things.
Debug : Getting rid of reported faults
Exercise : Run all bits of code and show it can be made to work
Test : Look for weaknesses.
If you're wondering how to find out what's going on inside your program
when you get a run-time problem then you might simply put in a
print_r(), or write a log of function calls, variable watches etc to
another file. [My PHP system is off-line at the minute or you could
have my debugging library]
FWIW the way to develop Exercise and Test is by making notes as you're
building the code: What could possibly go wrong?... Silly
arguments...flag this for future investigation to stop interrupting flow
of coding thought...is that a [D] for document a [E] for exercise or a
[T] for needs testing (or all of them). Then when you're setting out to
exercise you look for "[E] comments " in the code and build the
exercises accordingly. And so on.
PS Personally I don't care much for black box testing if the white box
(stupid name) has been done well.
--
PETER FOX Not the same since the deckchair business folded
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>