Reinhard Poetz pisze: > Grzegorz Kossakowski wrote: >> Reinhard Poetz pisze: >> >> Yes I was very happy to see your commits. However, I always thought >> that it's >> first that you write unit tests for covering the most basic >> functionality and >> ITs for testing how different parts interact with each other. >> >> Doesn't it make sense to write a few unit tests first? > > :-) yes, I fully agree. However, I wanted to explore the code by writing > unit tests but I failed. Maybe I invested to less time but I came to the > conclustion that it is easier to write integration tests.
I don't understand what you mean exactly. Do you mean it was too complicated to write unit tests? I haven't taken a closer look at your IT work but I guess it should be always easier to write isolated unit tests than ITs. Am I wrong? >> What kind of ITs do you plan to write? > > I want to test ... > o absolute and relative connections to servlet services > o connecting to blocks using the servlet:/ protocol > o super connections > o accessing information coming from the original request > o error handling > o postable sources > o servlet-service generator/transformer/serializer I don't want to be pesky but... most of these items looks like perfect cases for unit tests. Don't they? I'm not feeling good about testing basic functionality by using ITs because it introduces too much dependencies, IMHO. It was Daniel who taught me how to keep number of dependencies in tests as small as possible. He was endlessly reminding me when I was working during GSoC to use classes inheriting from pure TestCase and now I see he was perfectly right. Tests are normal code, the more complicated dependencies you introduce the more it's hard to maintain such code... >> >> Sure, tell what command exactly is needed to be fired. Is mvn clean >> install >> -P allbocks,it enough? > > yes Configuration at Continuum updated. -- Grzegorz Kossakowski Committer and PMC Member of Apache Cocoon http://reflectingonthevicissitudes.wordpress.com/
