[pmwiki-users] Unit testing pmwiki markup code

marc gmane at auxbuss.com
Fri Apr 25 03:51:40 CDT 2008

Randy said...
> Unit testing is creating automated "regression" tests so that you can  
> tell immediately when you've introduced a bug in your code.
> Ten years ago, I used to use Eclipse to unit test my Java code.
> Has anyone out there figured out a way to do unit testing for your  
> pmwiki markup code? If so, what tool do you use?

I'm an agile guy, so I can't write code without tests; it's just 
physically impossible for me ;-)

I use phpunit - for recipes and unravelling pmwiki behaviour; it's 
similar in use to JUnit, although I don't edit php in Eclipse, so I 
don't know whether doing so would give you the all the tasty benefits of 
running JUnit in Eclipse.

phpunit isn't that good, but if you write object oriented code, then 
it's not hard to write a small reflection object that will do the basic 
asserts for you.

At one point, I was considering trying to persuade Patrick to help build 
a full set of unit tests for pmwiki - especially as I would love to 
build a Ruby version of pmwiki.


More information about the pmwiki-users mailing list