lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Solr Wiki] Update of "TestingSolr" by chrismattmann
Date Sat, 12 Dec 2009 23:03:40 GMT
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 chrismattmann.
The comment on this change is: testing page, with contributions from Shalin..


New page:
= How to run Solr unit tests =

If you're going to be using or modifying Solr's source, unit tests are critical as they help
uncover potential downstream runtime errors that you might encounter, and they help to isolate
problems in any new functionality you're adding. The question is, how do you run Solr's unit
tests? Read on below to find out.

= Ant and Junit =

Solr uses the [[|Ant]] build system and leverages [[|Junit]]
as its testing harness plugin. A description of these technologies is outside the scope of
this page, but we recommend you go check out each individual project as they have their share
of testing tutorials. This guide is meant as a quick and dirty path to testing out Solr using
what's been chosen to test it.

= Running all tests =

ant test

Yes, it's that simple.

= Running a single unit test =

Run a single test using:
ant -Dtestcase=TestDistributedSearch clean test

Run tests inside a package (recursively):
ant -Dtestpackage=org.apache.solr.handler clean test

Run tests in package root:
ant -Dtestpackageroot=org.apache.solr.handler clean test

The above will exclude packages inside handler such as admin and component.

View raw message