|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.solr.util.BaseTestHarness
org.apache.solr.util.RestTestHarness
public class RestTestHarness
Facilitates testing Solr's REST API via a provided embedded Jetty
| Constructor Summary | |
|---|---|
RestTestHarness(RESTfulServerProvider serverProvider)
|
|
| Method Summary | |
|---|---|
String |
checkQueryStatus(String xml,
String code)
|
String |
getBaseURL()
|
String |
query(String request)
Processes a "query" using a URL path (with no context path) + optional query params, e.g. |
void |
reload()
Reloads the core |
String |
update(String xml)
Processes an "update" (add, commit or optimize) and returns the response as a String. |
String |
validateQuery(String request,
String... tests)
Validates a "query" response against an array of XPath test strings |
| Methods inherited from class org.apache.solr.util.BaseTestHarness |
|---|
checkUpdateStatus, commit, deleteById, deleteByQuery, getXmlDocumentBuilder, getXpath, makeSimpleDoc, optimize, simpleTag, validateErrorUpdate, validateUpdate, validateXPath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RestTestHarness(RESTfulServerProvider serverProvider)
| Method Detail |
|---|
public String getBaseURL()
public String validateQuery(String request,
String... tests)
throws Exception
request - the Query to process
Exception - any exception in the response.
IOException - if there is a problem writing the XML
public String query(String request)
throws Exception
request - the URL path and optional query params
Exception - any exception in the response.
public String checkQueryStatus(String xml,
String code)
throws Exception
Exception
public void reload()
throws Exception
BaseTestHarness
reload in class BaseTestHarnessExceptionpublic String update(String xml)
update in class BaseTestHarnessxml - The XML of the update
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||