What is a Testcase - especially in CakePHP?
Posted on 9/6/09 by Tim Koschützki
Hey folks,
it's amazing how many people on the public CakePHP irc channel don't know what a test case is. This has to stop. To clear up some confusion, let's have a look at it.
What is a Test Case? A Possible Definition
This is what wikipedia has to say about a testcase:
A test case in software engineering is a set of conditions or variables under which a tester will determine whether an application or software system is working correctly or not. The mechanism for determining whether a software program or system has passed or failed such a test is known as a test oracle. In some settings, an oracle could be a requirement or use case, while in others it could be a heuristic. It may take many test cases to determine that a software program or system is functioning correctly. Test cases are often referred to as test scripts, particularly when written. Written test cases are usually collected into test suites.
So is this me testing stuff in my browser?
Yes and no. The definition does not necessarily imply that a testcase has anything to do with Unit Testing, or other testing approaches.
You testing your menu bar's javascript in several browsers in different resolutions can also be considered to be a testcase (or many for that matter) according to the definition. However, most of the time a testcase is meant to be a written test. When it comes to CakePHP, it's mainly a Unit Test.
Where can I learn about test cases?
There are a ton of resources on the web for tests. If you are looking for material for CakePHP, try out these:
- The Article "Introduction to Unit Testing Part 1" written by yours truly
- The CakePHP CookBook Chapter on Testing
- Your First Testcase
- Mark Story's Unit Testing Talk Slide for CakeFest Argentinia December 2009
- My slides for the Unit Testing Talk for CakeFest Orlando February 2008
Lets get a discussion started to clear up confusion.
-- Tim Koschuetzki aka DarkAngelBGE
You can skip to the end and add a comment.
Tests are something that many people miss while learning cake, i think it should be more encouraged.
Btw, the slides talk link in point 4 has a wrong date.
Regards.
Thanks Inside for the heads up. :)
I would also suggest "The Art of Testivus".
I slowly recommend posting unconsciously link a few to your http://cialis-generic.net/>cheap generic cialis at superb a the maximum rate of bitter end of ea job title you unmistakably make a few to your blog. This strong will slowly give you even any more broad generic cialis a few to your site. #4 - write articles:one of for the best ways a few to silent become an generic cialis expert on your significant work is a few to write out articles on the i. And key on superb a unconsciously link a few to your generic cialis in the resources box..
This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.
Would just like to say there are certainly a lot of interesting things being said here i will definately get back in a short while to participate actively.