You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Chris A. Mattmann (JIRA)" <ji...@apache.org> on 2009/12/12 22:52:18 UTC

[jira] Created: (SOLR-1652) Allow single unit test to be executed from SOLR build.xml

Allow single unit test to be executed from SOLR build.xml
---------------------------------------------------------

                 Key: SOLR-1652
                 URL: https://issues.apache.org/jira/browse/SOLR-1652
             Project: Solr
          Issue Type: New Feature
          Components: Build
    Affects Versions: 1.4, 1.3, 1.2
         Environment: My local MacBook
            Reporter: Chris A. Mattmann
             Fix For: 1.5


While playing around and running someone's example code in the form of a test, I realized it might be nice to run a single test from the ant command line when testing SOLR. To my knowledge, there is no way to do this. So, I googled around and found a nice way of doing it. I'll contribute a patch that allows you to do:

ant runtest -Dtest=<fully qualified class name or just class name no package> [-Dargs=<jvm args for junit>]

which will run one of SOLR's unit tests at a time. You can also use *'s in the -Dtest= to run many test cases that match the * expression too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1652) Allow single unit test to be executed from SOLR build.xml

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789803#action_12789803 ] 

Shalin Shekhar Mangar commented on SOLR-1652:
---------------------------------------------

This capability already exists.

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.

> Allow single unit test to be executed from SOLR build.xml
> ---------------------------------------------------------
>
>                 Key: SOLR-1652
>                 URL: https://issues.apache.org/jira/browse/SOLR-1652
>             Project: Solr
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 1.2, 1.3, 1.4
>         Environment: My local MacBook
>            Reporter: Chris A. Mattmann
>             Fix For: 1.5
>
>
> While playing around and running someone's example code in the form of a test, I realized it might be nice to run a single test from the ant command line when testing SOLR. To my knowledge, there is no way to do this. So, I googled around and found a nice way of doing it. I'll contribute a patch that allows you to do:
> ant runtest -Dtest=<fully qualified class name or just class name no package> [-Dargs=<jvm args for junit>]
> which will run one of SOLR's unit tests at a time. You can also use *'s in the -Dtest= to run many test cases that match the * expression too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1652) Allow single unit test to be executed from SOLR build.xml

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann updated SOLR-1652:
------------------------------------

    Attachment: SOLR-1652.Mattmann.121209.patch.txt

> Allow single unit test to be executed from SOLR build.xml
> ---------------------------------------------------------
>
>                 Key: SOLR-1652
>                 URL: https://issues.apache.org/jira/browse/SOLR-1652
>             Project: Solr
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 1.2, 1.3, 1.4
>         Environment: My local MacBook
>            Reporter: Chris A. Mattmann
>             Fix For: 1.5
>
>         Attachments: SOLR-1652.Mattmann.121209.patch.txt
>
>
> While playing around and running someone's example code in the form of a test, I realized it might be nice to run a single test from the ant command line when testing SOLR. To my knowledge, there is no way to do this. So, I googled around and found a nice way of doing it. I'll contribute a patch that allows you to do:
> ant runtest -Dtest=<fully qualified class name or just class name no package> [-Dargs=<jvm args for junit>]
> which will run one of SOLR's unit tests at a time. You can also use *'s in the -Dtest= to run many test cases that match the * expression too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-1652) Allow single unit test to be executed from SOLR build.xml

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann resolved SOLR-1652.
-------------------------------------

    Resolution: Won't Fix

Thanks, Shalin. Since I didn't see documentation on this anywhere on the Solr Wiki, I went ahead and added a page:

http://wiki.apache.org/solr/TestingSolr

and a link to it on the Solr main page.

Thanks!

> Allow single unit test to be executed from SOLR build.xml
> ---------------------------------------------------------
>
>                 Key: SOLR-1652
>                 URL: https://issues.apache.org/jira/browse/SOLR-1652
>             Project: Solr
>          Issue Type: New Feature
>          Components: Build
>    Affects Versions: 1.2, 1.3, 1.4
>         Environment: My local MacBook
>            Reporter: Chris A. Mattmann
>             Fix For: 1.5
>
>         Attachments: SOLR-1652.Mattmann.121209.patch.txt
>
>
> While playing around and running someone's example code in the form of a test, I realized it might be nice to run a single test from the ant command line when testing SOLR. To my knowledge, there is no way to do this. So, I googled around and found a nice way of doing it. I'll contribute a patch that allows you to do:
> ant runtest -Dtest=<fully qualified class name or just class name no package> [-Dargs=<jvm args for junit>]
> which will run one of SOLR's unit tests at a time. You can also use *'s in the -Dtest= to run many test cases that match the * expression too.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.