运行 使用 ant 的 solr 中的单元测试用例

Running the Unit test cases in solr using ant

我正在尝试 运行 使用 ant 在 solr 中测试我的用例。下面是我正在使用的 ant 命令:

ant test –Dtestcase=<test case name> test  -Dtests.leaveTemporary=true 

现在我有了自己的自定义 solrconfig 和架构,所以 运行上面的命令再次构建项目并覆盖我自定义的 solrconfig 和架构。

请帮我解决这个问题。

您可以使用以下方法: initCore(String config, String schema, String solrHome) of class SolrTestCaseJ4.java in your TestCase 并将自定义架构和配置的路径作为 solrHome(典型格式:solr\collection1\conf)传递。