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)
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
Now the Hibernate store tests still need a database although, it is not
integration tests.
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..
Hypersonice would be a simplicity improvement.. It's actually a good
idea also to have a default release running Hypersonic..
Ludovic
PS: there is some refactoring needed from Luis, who has setup additional
hibernate and xwiki configs for his atom tests, instead of using the
same one as the other tests.
Ludovic
Vincent Massol a écrit :
There are 2 types of tests
- unit tests
- integration tests
I'd like to run only the unit tests as I believe the integration ones
require some setup (Which is BTW not nice - they should be automated as
well).
How do I run the unit tests?
Where are located the unit tests? Where are located the integration tests?
It seems to me that there are integration tests in src/test, mixed with unit
tests. Is that right?
What do I need to run all the tests?
Thanks
-Vincent
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-dev(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic