Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jwt-dev] Tests and unit testing in JWT ?

Hi all

The issue of tests and how to do unit testing in JWT is of interest for the core development team as well as anybody wishing to use JWT for his own purpose.

So what do you think about tests and unit testing in JWT ?

As a starter, I've tried to compile a few answers here - feedback welcome !

JWT tests status :
* none in WE, many but not yet automated in Transformations, junit tests in runtime parts (but their impl is generally not jwt per se since not available on eclipse because of license issues)

Unit testing
* for unit tests of eclipse plugins, use pde.junit plugin (from jdt ui page). In addition to executing junit tests, it takes care of initializing an eclipse workspace, as required by eclipse plugins. * "httpunit-like" tools are scarce and far from useful in the field of heavy client UIs. Some of my colleagues had a little bit of experience with such IBM tools targeting Swing UIs back then, and say that writing tests was far more cumbersome and long than writing the UI itself -_- * hence nothing car replace functional testing (test plans etc.) to know a UI is not broken in use or impl - though a good architecture (like emf - gmf - extension points - common patterns etc.), development and integration methodology, limits risks. * more about testing eclipse plugins : see the excellent gamma & beck book, and especially its chap12 that is freely available here http://today.java.net/today/2004/02/02/ch12Eclipse.pdf

So what if you want to make your own tooling by extending JWT, and you'd like to have some level of trust in the fact that a given release of JWT is not broken, or that your extensions are not breaking it ? According to Alexandre Boutin (main french advocate of Lean Programming), * it would not be business-savvy to spend time writing tests for existing code. If code exists without tests and you trust it, use it so. * But if it breaks at some point, then add tests ensuring it won't break the same way anymore.

Regards,
Marc


Back to the top