Hi,
as there are nearlly no cocoon2 tests,
I started to write some junit testcases.
Testing the default webapplication of cocoon2,
no cocoon2 internal components testing so far.
I know that there were some thoughts about
ant, and cactus, nevertheless i'm using
httpunit (http://sourceforge.net/project/showfiles.php?group_id=6550).
The reason was that httpunit has a built-in servlet-container.
This may allow to do testing without deploying cocoon2 to
a servlet container. Sadly I have not managed to this, yet.
Thus testing works only if cocoon2 is deployed.
The testcases so far are simple:
requesting welcome page of Cocoon2,
examing links of the welcome page,
requesting C2Doc page,
examing all non external links of the C2Doc
sidebar.
Launching the testcases:
build.bat test, or build.sh test
Note:
If you have installed hsqldb inproperly,
cocoon2 will endlessly try to create an sql pool.
The StressWelcomeTest takes quite some time.
As I was missing some organisational discussion
I put the testcases under test/httpunit/webapp.
I hope Cocoon2 will get sooner or later some
testcases, using either httpunit, or some other
http framework.
I don't know whether cactus or httpunit is better.
This approach is quite simple.
As I the tidy package is used by httpunit, tidy complains
about some pages not conforming to HTML, especially some
"forgotten" XML tags.
The java testcases, and the result of a test run are attaced in the
zip.
httpunit-testcases.zip
begin:vcard
n:Huber;Bernhard
fn:Bernhard Huber
version:2.1
email;internet:[EMAIL PROTECTED]
end:vcard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]