[xwiki-devs] best way to set-up test for the tuned lucene plugin?
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"). thanks for hints. paul
On Wed, Feb 3, 2010 at 17:22, Paul Libbrecht <[email protected]> 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/t.... 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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Wed, Feb 3, 2010 at 19:42, Thomas Mortagne <[email protected]> wrote:
On Wed, Feb 3, 2010 at 17:22, Paul Libbrecht <[email protected]> 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/t....
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 [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
Thanks Thomas, I was definitely looking at unit tests. As much as possible I'd be looking for mock objects. AbstractBridgedXWikiComponentTestCase tastes like one indeed. But... is there any chance that this class runs with xwiki 1.5.4 ?? thanks paul Le 03-févr.-10 à 19:45, Thomas Mortagne a écrit :
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/t... .
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).
On Wed, Feb 3, 2010 at 20:46, Paul Libbrecht <[email protected]> wrote:
Thanks Thomas,
I was definitely looking at unit tests. As much as possible I'd be looking for mock objects. AbstractBridgedXWikiComponentTestCase tastes like one indeed. But... is there any chance that this class runs with xwiki 1.5.4 ??
Yes but in 1.5.2 it's located in old shared-test tool project instead of xwiki-core project. See http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-tools/tags/xwiki-shared-te...
thanks paul
Le 03-févr.-10 à 19:45, Thomas Mortagne a écrit :
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/t... .
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).
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
participants (2)
-
Paul Libbrecht -
Thomas Mortagne