-----Original Message----- From: Ludovic Dubost [mailto:[email protected]] Sent: lundi 23 mai 2005 10:58 To: [email protected] Subject: Re: [xwiki-dev] All tests failed in the build?
Currently in XWiki you have 5 types of tests:
1/ unit tests that need to database 2/ unit tests that need a database 3/ unit tests that need 2 databases (virtual wiki tests) 4/ cactus test that need a database 5/ cactus tests that need 2 databases (virtual wiki tests)
Just to be sure we are using the same meme, I call "integration tests", types 2 (provided they don't need anything else from the environment - like a container, ldap, etc), 3, 4 and 5.
Cactus tests are very close to what you call integration tests, as they handle a full wiki requests without any stubs or mock objects Unit tests are sometimes not unit enough, in the sense that they would deserve some mock objects
Integration tests is for me whenever there's a need for an external system set up (db, container, ldap). In practice what matters when differentiating unit tests from integration tests are: - the execution speed - the setup they require from the user So it's good to separate tests along these 2 criteria.
Now the Hibernate store tests still need a database although, it is not integration tests.
I call that integration test too.
I agree that we could use Hypersonic as a tests database which would simplify setup.. We just need to verify that hypersonic supports "setCatalog" to switch databases, which is necessary for the virtual wiki tests.
What you currently need to test:
1/ a mysql instance 2/ 2 databases called xwikitest and xwikitest2, accessible from localhost by the user xwikitest/xwikitest 3/ a tomcat instance for the cactus tests
It requires a little bit of setup but it's actually what you also need to run an xwiki instance locally..
Yeah, which is exactly why I've not already installed a xwiki instance on my machine! :-) [snip] I think the build should not assume anything from the user and should run as is. This is what happens with the Cargo build for example. You only need Maven installed. You checkout you type "maven" and it does everything including functional tests with nothing required from you, not even a build.properties file. The only thing it needs is an internet connection. -Vincent ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran�ais ! Yahoo! Mail : http://fr.mail.yahoo.com