On Wed, Feb 3, 2010 at 19:42, Thomas Mortagne <thomas.mortagne(a)xwiki.com> wrote:
On Wed, Feb 3, 2010 at 17:22, Paul Libbrecht
<paul(a)activemath.org> wrote:
Hello developers,
what's the best way for me to setup tests for the lucene plugin?
Is there an easy way for me to create an xwiki content-store with all
the documents of this xar directory?
That'd be my favourite.
Alter natively, I could create XWikiDocument from xml by hand in the
editor (but then I'm missing the callback "also add this and that").
I depends what you want to test.
If you want to do unit test you can look at Lucene plugin itself which
contains some already (some of them mock storage and observation
manager for example). You can look at
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-plugins/trunk/lucene/src/….
IMO unit test sounds the best in your case since you can easily
mock/emulate everything the plugin needs in general and it's a lot
easier than integration tests to debug (works well inside Eclipse for
example using the junit plugin).
You can also setup a XE integration test project by copy/pasting or
adding your own test in one of the project you can find in
http://svn.xwiki.org/svnroot/xwiki/enterprise/trunk/distribution-test/
(selenium-tests is usually the one used for most of test that don't
require specific configuration).
thanks for hints.
paul
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
--
Thomas Mortagne
--
Thomas Mortagne