You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by adeelmahmood <ad...@gmail.com> on 2010/12/20 03:48:35 UTC
running solr tests in eclipse
I am not sure if I am able to run the unit tests for solr in eclipse .. If i
just ran the build.xml with test arg .. it runs all the tests and shows that
they are successful and all that .. very few fail though .. but more
importantly if i wanna run a single testcase by
-Dtestcase=org.apache.solr.request.TestFaceting.testFacets clean test
arg .. then it does all the compile steps but for the actual test it doesnt
shows any output .. in terms of whether the test was successful or not ..
here is the output
......
compile:
compileTests:
[mkdir] Created dir:
C:\Users\Adeel\Documents\workspace-sts-2.5.1.RELEASE\solr\contrib\extraction\build\test-classes
[javac] Compiling 1 source file to
C:\Users\Adeel\Documents\workspace-sts-2.5.1.RELEASE\solr\contrib\extraction\build\test-classes
test:
test:
BUILD SUCCESSFUL
Total time: 4 minutes 44 seconds
I am not even sure if the test is really running .. also why cant I just run
the test directly by clicking on the class and Run the method as junit test
case ..
Thanks for your help
Adeel
--
View this message in context: http://lucene.472066.n3.nabble.com/running-solr-tests-in-eclipse-tp2118157p2118157.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: running solr tests in eclipse
Posted by adeelmahmood <ad...@gmail.com>.
Hey Hoss
Thanks for the suggestions. I tried
"-Dtestcase=TestFaceting -Dtestmethod=testFacets"
and
"-Dtestcase=org.apache.solr.request.TestFaceting -Dtestmethod=testFacets"
and it still gave the same output where it doesnt tries to the run the test
..so no success no failure .. simply shows
....
compileTests:
[mkdir] Created dir:
C:\Users\Adeel\Documents\workspace-sts-2.5.1.RELEASE\solr\contrib\extraction\build\test-classes
[javac] Compiling 1 source file to
C:\Users\Adeel\Documents\workspace-sts-2.5.1.RELEASE\solr\contrib\extraction\build\test-classes
test:
test:
BUILD SUCCESSFUL
also I have read that document and several others and these are the two
settings i have changed in my eclipse for solr
1. add -ea to vm arguments
2. specified the test working directory as solr/test/test-files
but if I try to right click on a test method and run it as unit test .. it
gives me this error output
Class not found org.apache.solr.request.TestFaceting
java.lang.ClassNotFoundException: org.apache.solr.request.TestFaceting
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I would appreciate any suggestions ..
thanks
Adeel
On Tue, Dec 21, 2010 at 11:20 AM, Chris Hostetter-3 [via Lucene] <
ml-node+2127008-1537537263-19047@n3.nabble.com<ml...@n3.nabble.com>
> wrote:
> : importantly if i wanna run a single testcase by
> : -Dtestcase=org.apache.solr.request.TestFaceting.testFacets clean test
>
> I think that should be "-Dtestcase=TestFaceting -Dtestmethod=testFacets"
>
> : I am not even sure if the test is really running .. also why cant I just
> run
> : the test directly by clicking on the class and Run the method as junit
> test
> : case ..
>
> If you configure your IDE with the neccessary system properties, that
> should be possible. did you read the wiki?
>
> http://wiki.apache.org/solr/TestingSolr
> http://wiki.apache.org/solr/HowToContribute#Development_Environment_Tips
>
> -Hoss
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=2127008&i=0>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=2127008&i=1>
>
>
>
> ------------------------------
> View message @
> http://lucene.472066.n3.nabble.com/Re-running-solr-tests-in-eclipse-tp2127008p2127008.html
> To start a new topic under Solr - Dev, email
> ml-node+506503-177216804-19047@n3.nabble.com<ml...@n3.nabble.com>
> To unsubscribe from Solr - Dev, click here<http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=506503&code=YWRlZWxtYWhtb29kQGdtYWlsLmNvbXw1MDY1MDN8LTg2NzQwODU2Nw==>.
>
>
--
View this message in context: http://lucene.472066.n3.nabble.com/Re-running-solr-tests-in-eclipse-tp2127008p2128965.html
Sent from the Solr - Dev mailing list archive at Nabble.com.
Re: running solr tests in eclipse
Posted by Chris Hostetter <ho...@fucit.org>.
: importantly if i wanna run a single testcase by
: -Dtestcase=org.apache.solr.request.TestFaceting.testFacets clean test
I think that should be "-Dtestcase=TestFaceting -Dtestmethod=testFacets"
: I am not even sure if the test is really running .. also why cant I just run
: the test directly by clicking on the class and Run the method as junit test
: case ..
If you configure your IDE with the neccessary system properties, that
should be possible. did you read the wiki?
http://wiki.apache.org/solr/TestingSolr
http://wiki.apache.org/solr/HowToContribute#Development_Environment_Tips
-Hoss
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org