You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2013/05/30 17:05:51 UTC
[Solr Wiki] Update of "TestingSolr" by SteveRowe
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.
The "TestingSolr" page has been changed by SteveRowe:
http://wiki.apache.org/solr/TestingSolr?action=diff&rev1=4&rev2=5
Comment:
-Dtestpackage -> -Dtests.class with glob; remove non-recursive -Dtestpackageroot example, which is AFAICT no longer supported
= Running specific unit tests =
+ For full usage instructions, run ant test-help. A subset of those instructions follows here.
Run a specific test method:
@@ -31, +32 @@
ant -Dtestcase=TestDistributedSearch clean test
}}}
- Run tests inside a package (recursively):
+ Run tests inside a package and its sub-packages:
{{{
- ant -Dtestpackage=org.apache.solr.handler clean test
+ ant -Dtests.class="org.apache.solr.handler.*" clean test
}}}
- Run tests in package root:
+ {{{-Dtests.class}}} is a class-filtering shell-like glob pattern. {{{-Dtestcase=XXX}}} is an alias for {{{-Dtests.class=*.XXX}}}.
+ {{{-Dtests.method}}} is a method-filtering glob pattern. {{{-Dtestmethod=XXX}}} is an alias for {{{-Dtests.method=XXX*}}}.
- {{{
- ant -Dtestpackageroot=org.apache.solr.handler clean test
- }}}
-
- The above will exclude packages inside handler such as admin and component.
= Running tests from Eclipse =
Set the current working directory for the tests to src/test/test-files. In Eclipse, that can be done by going to the Run/Debug Configuration -> Arguments tab. In the Working directory select "other" and enter the path to the test-files directory.