Cinema update: Yesterday I saw *Les Triplettes de Belleville* (IMDB:0286244). Last week I saw *Un Oso Rojo* (IMDB:0318523) last week.
Been thinking about edit conflicts are handled in OddMuse (see MeatBall:EditConflict). I then switched it to “Winner takes all”, then I added warning messages, and then – prompted by a comment by Martin Harper on Meatball – I added merging back in, but left the “two edit box fallback” away and stuck with the warning messages. I think the script improved. Nice to see how coding itself is part of the process – not all the code has to remain in the end product for the product to be better! (It is nice if the code remains in an archive, however). It is also nice to see how writing things up on Meatball prompts me to do changes to the code. And being able to change the script, test it, and implement a third solution – all on the same day – is a good sign for the code quality. And I am so incredibly proud about my unit test script! I added test cases for all the conflict handling stuff, now.
(Please contact me if you want to remove your comment.)
⁂
How did you set that up? Does it drive the script over HTTP, emulate a CGI environment, or does it test the underlying routines? I was actually pondering how to unit test a web site last night. I’m working on a project at the moment which is basically a web-based database app (the epitome of fun 😉). All the backend routines have associated unit tests, which means when things fall over, it tends to be with the web front-end.
I was pondering how to make it feasible to write unit tests which encaptulate the sequence of post/get requests which might come from performing a particular operation, but to do so in a way easy enough to make writing the tests worthwhile. At this stage I think emulating the CGI environment might be the best bet. – DamienElmes 2003-10-07 1:23 UTC
---
There are a couple of unit testing tools for web application:
http://www.junit.org/news/extension/web/index.htm
I just looked at Canoo and what my scripts do is very similar to that. The only difference is that I don’t use XML and no structuring, so you can only run all tests by running one command. The tests are not available as a tree with branches that can be tested individually. – Alex Schroeder