Wrote my first SUnit tests for the Squeak Smalltalk/Seaside web framework project that I’m working on, yesterday.
Slow going! I think I have the hang of individual tests; now I gotta figure out how to make test suites out of them, and run all the tests at once.
(Also, I have to see if Squeak has a web testing framework like the PHP one I found).
Dmitri Z. has written 5 entries about this goal
I’m mostly doing Squeak / Smalltalk development now.
I know it has unit testing framework (hell, it’s the original one), and web testing, too, so I need to go learn it.
So, test-first development has been suspended, unfortunately.
Slowly getting the hang of automated testing, with PHP and SimpleTest.
Since I’m starting it up in the middle of an already existing project (I’m kind of stuck, and performing extensive refactoring), I’m slowly starting to accumulate a collection of tests for the existing code. Once I catch up, and start coding new features, I’ll start on test-first development (vs. test closely after :) ).
For each module / web site section, I’m dividing the tests into Code tests (using the unit tester) and Web tests (external tests using web tester, such as “does the page exist” “does this link go here”, etc).
After installing PHPUnit, and being briefly puzzled at what the difference is between PHPUnit and PEAR::PhpUnit (answer: they’re not the same, the PEAR version appears to be better), I wrote and ran my first test!
The other thing I realized was, aside from just doing unit testing of PHP classes and functions, I would need some kind of Web testing framework, that would simulate the browser, and allow me to test the end result of my PHP programs—the web pages themselves.
Then I came across SimpleTest. It’s PHP-based, and appears to have the same functionality as PEAR:PhpUnit. But it also includes a WebTest component, with authentication and cookies and forms and everything.
So, it seems I’ve found the one-stop tool. Now to take a deep breath and dive into religious test-first development.
Faced with the prospect of rewriting a PHP project, I’m figuring it’s an ideal time to try out test-first development.
I some experience with jUnit in college, for a software development course. I figure this won’t be too much different.
Installed ‘phpunit’ on my Debian Sarge box. Now to read the docs, and get down to some unit testing!
Dmitri Z. has gotten 3 cheers on this goal.
davewasthere cheered this 1 year ago
Danie Roux cheered this 2 years ago
Lynoure cheered this 2 years ago
