Frans Thamura wrote:
hi there,

i just have several question around unit testing for our project, cimande

and we have lack of skill to to unit testing for our core (cimande), and our
apps on cimande (postila, papaje, takatu, etc).

anyone can share?

how to start a good unit testing for Struts2 based application, so our code
is good

F


Hi Frans,
In my opinion, the biggest contributor to "good unit testing" is to first setup a continuous build system. The earlier in a project that you do this the better as the inertia against this grows. Among other benefits, it helps prevent tests from going stale (written once and then subsequently ignored). Unfortunately it doesn't prevent developers from commenting out tests they don't understand or accidentally broke; that discipline can only be learned it seems.

The best examples of unit testing with struts2 are within the struts2 source itself. The other frameworks you use will also include good examples of how to mock up the test environment.

I don't recommend testing for testing sake. Start small on the important code to develop some good practices. The value of test-driven development becomes evident as projects become massive. Eventually it's less effort and more productive to convince yourself that something works via a unit test rather than to run a build and deploy cycle. I think that developers only appreciate that after experiencing "oops, I'm glad I tested that first" for themselves.

cheers,
Jeromy Evans


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to