You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spark.apache.org by Stefano Baghino <st...@radicalbit.io> on 2015/11/03 09:27:24 UTC

Running individual test classes

Hi all,

I'm new to contributing to Spark (and Apache projects in general); I've
started working on SPARK-7425
<https://issues.apache.org/jira/browse/SPARK-7425> and have implemented
what looks like a viable solution. Now I'd like to test it, however I'm
having some trouble running an individual test class to quickly iterate
over it; I tried running

mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test

and (without the fully qualified class name)

mvn -Dtest=ProbabilisticClassifierSuite test

but both commands resulted in running all tests, both when launching Maven
from the project root and from the MLlib module root. I've tried to look
this up in the mailing list archives but haven't had luck so far.

How can I run a single test suite? Thanks in advance!

-- 
BR,
Stefano Baghino

Re: Running individual test classes

Posted by Stefano Baghino <st...@radicalbit.io>.
Good to know, thank you very much. :)

On Tue, Nov 3, 2015 at 12:02 PM, Michael Armbrust <mi...@databricks.com>
wrote:

> We support both build systems.  We use maven to publish the canonical
> distributions as it interoperates better with downstream consumers.  Most
> of the developers that I know, however, use SBT for day to day development.
>
> On Tue, Nov 3, 2015 at 11:36 AM, Stefano Baghino <
> stefano.baghino@radicalbit.io> wrote:
>
>> Oh, I saw POMs and thought I was supposed to use Maven. Thank you so much
>> for the help, I'll try it as soon as possible.
>>
>> On Tue, Nov 3, 2015 at 10:24 AM, Nitin Goyal <ni...@gmail.com>
>> wrote:
>>
>>> In maven, you might want to try following :-
>>>
>>> -DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite
>>>
>>> On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <michael@databricks.com
>>> > wrote:
>>>
>>>> In SBT:
>>>>
>>>> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>>>>
>>>> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
>>>> stefano.baghino@radicalbit.io> wrote:
>>>>
>>>>> Hi all,
>>>>>
>>>>> I'm new to contributing to Spark (and Apache projects in general);
>>>>> I've started working on SPARK-7425
>>>>> <https://issues.apache.org/jira/browse/SPARK-7425> and have
>>>>> implemented what looks like a viable solution. Now I'd like to test it,
>>>>> however I'm having some trouble running an individual test class to quickly
>>>>> iterate over it; I tried running
>>>>>
>>>>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>>>>
>>>>> and (without the fully qualified class name)
>>>>>
>>>>> mvn -Dtest=ProbabilisticClassifierSuite test
>>>>>
>>>>> but both commands resulted in running all tests, both when launching
>>>>> Maven from the project root and from the MLlib module root. I've tried to
>>>>> look this up in the mailing list archives but haven't had luck so far.
>>>>>
>>>>> How can I run a single test suite? Thanks in advance!
>>>>>
>>>>> --
>>>>> BR,
>>>>> Stefano Baghino
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Regards
>>> Nitin Goyal
>>>
>>
>>
>>
>> --
>> BR,
>> Stefano Baghino
>>
>> Software Engineer @ Radicalbit
>>
>
>


-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Re: Running individual test classes

Posted by Michael Armbrust <mi...@databricks.com>.
We support both build systems.  We use maven to publish the canonical
distributions as it interoperates better with downstream consumers.  Most
of the developers that I know, however, use SBT for day to day development.

On Tue, Nov 3, 2015 at 11:36 AM, Stefano Baghino <
stefano.baghino@radicalbit.io> wrote:

> Oh, I saw POMs and thought I was supposed to use Maven. Thank you so much
> for the help, I'll try it as soon as possible.
>
> On Tue, Nov 3, 2015 at 10:24 AM, Nitin Goyal <ni...@gmail.com>
> wrote:
>
>> In maven, you might want to try following :-
>>
>> -DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite
>>
>> On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <mi...@databricks.com>
>> wrote:
>>
>>> In SBT:
>>>
>>> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>>>
>>> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
>>> stefano.baghino@radicalbit.io> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm new to contributing to Spark (and Apache projects in general); I've
>>>> started working on SPARK-7425
>>>> <https://issues.apache.org/jira/browse/SPARK-7425> and have
>>>> implemented what looks like a viable solution. Now I'd like to test it,
>>>> however I'm having some trouble running an individual test class to quickly
>>>> iterate over it; I tried running
>>>>
>>>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>>>
>>>> and (without the fully qualified class name)
>>>>
>>>> mvn -Dtest=ProbabilisticClassifierSuite test
>>>>
>>>> but both commands resulted in running all tests, both when launching
>>>> Maven from the project root and from the MLlib module root. I've tried to
>>>> look this up in the mailing list archives but haven't had luck so far.
>>>>
>>>> How can I run a single test suite? Thanks in advance!
>>>>
>>>> --
>>>> BR,
>>>> Stefano Baghino
>>>>
>>>
>>>
>>
>>
>> --
>> Regards
>> Nitin Goyal
>>
>
>
>
> --
> BR,
> Stefano Baghino
>
> Software Engineer @ Radicalbit
>

Re: Running individual test classes

Posted by Stefano Baghino <st...@radicalbit.io>.
Oh, I saw POMs and thought I was supposed to use Maven. Thank you so much
for the help, I'll try it as soon as possible.

On Tue, Nov 3, 2015 at 10:24 AM, Nitin Goyal <ni...@gmail.com> wrote:

> In maven, you might want to try following :-
>
> -DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite
>
> On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <mi...@databricks.com>
> wrote:
>
>> In SBT:
>>
>> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>>
>> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
>> stefano.baghino@radicalbit.io> wrote:
>>
>>> Hi all,
>>>
>>> I'm new to contributing to Spark (and Apache projects in general); I've
>>> started working on SPARK-7425
>>> <https://issues.apache.org/jira/browse/SPARK-7425> and have implemented
>>> what looks like a viable solution. Now I'd like to test it, however I'm
>>> having some trouble running an individual test class to quickly iterate
>>> over it; I tried running
>>>
>>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>>
>>> and (without the fully qualified class name)
>>>
>>> mvn -Dtest=ProbabilisticClassifierSuite test
>>>
>>> but both commands resulted in running all tests, both when launching
>>> Maven from the project root and from the MLlib module root. I've tried to
>>> look this up in the mailing list archives but haven't had luck so far.
>>>
>>> How can I run a single test suite? Thanks in advance!
>>>
>>> --
>>> BR,
>>> Stefano Baghino
>>>
>>
>>
>
>
> --
> Regards
> Nitin Goyal
>



-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Re: Running individual test classes

Posted by Stefano Baghino <st...@radicalbit.io>.
Thank you for the tip, I'll keep that in mind.

On Tue, Nov 3, 2015 at 1:57 PM, Ted Yu <yu...@gmail.com> wrote:

> My experience is that going through tests in each module takes some time
> before reaching the test specified by the wildcard.
>
> Some test, such as SparkLauncherSuite, would run even if not in wildcard.
>
> FYI
>
> On Nov 3, 2015, at 1:24 AM, Nitin Goyal <ni...@gmail.com> wrote:
>
> In maven, you might want to try following :-
>
> -DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite
>
> On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <mi...@databricks.com>
> wrote:
>
>> In SBT:
>>
>> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>>
>> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
>> stefano.baghino@radicalbit.io> wrote:
>>
>>> Hi all,
>>>
>>> I'm new to contributing to Spark (and Apache projects in general); I've
>>> started working on SPARK-7425
>>> <https://issues.apache.org/jira/browse/SPARK-7425> and have implemented
>>> what looks like a viable solution. Now I'd like to test it, however I'm
>>> having some trouble running an individual test class to quickly iterate
>>> over it; I tried running
>>>
>>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>>
>>> and (without the fully qualified class name)
>>>
>>> mvn -Dtest=ProbabilisticClassifierSuite test
>>>
>>> but both commands resulted in running all tests, both when launching
>>> Maven from the project root and from the MLlib module root. I've tried to
>>> look this up in the mailing list archives but haven't had luck so far.
>>>
>>> How can I run a single test suite? Thanks in advance!
>>>
>>> --
>>> BR,
>>> Stefano Baghino
>>>
>>
>>
>
>
> --
> Regards
> Nitin Goyal
>
>


-- 
BR,
Stefano Baghino

Software Engineer @ Radicalbit

Re: Running individual test classes

Posted by Ted Yu <yu...@gmail.com>.
My experience is that going through tests in each module takes some time before reaching the test specified by the wildcard. 

Some test, such as SparkLauncherSuite, would run even if not in wildcard. 

FYI 

> On Nov 3, 2015, at 1:24 AM, Nitin Goyal <ni...@gmail.com> wrote:
> 
> In maven, you might want to try following :-
> 
> -DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite
> 
> 
>> On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <mi...@databricks.com> wrote:
>> In SBT:
>> 
>> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>> 
>>> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <st...@radicalbit.io> wrote:
>>> Hi all,
>>> 
>>> I'm new to contributing to Spark (and Apache projects in general); I've started working on SPARK-7425 and have implemented what looks like a viable solution. Now I'd like to test it, however I'm having some trouble running an individual test class to quickly iterate over it; I tried running
>>> 
>>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>> 
>>> and (without the fully qualified class name)
>>> 
>>> mvn -Dtest=ProbabilisticClassifierSuite test
>>> 
>>> but both commands resulted in running all tests, both when launching Maven from the project root and from the MLlib module root. I've tried to look this up in the mailing list archives but haven't had luck so far.
>>> 
>>> How can I run a single test suite? Thanks in advance!
>>> 
>>> -- 
>>> BR,
>>> Stefano Baghino
> 
> 
> 
> -- 
> Regards
> Nitin Goyal

Re: Running individual test classes

Posted by Nitin Goyal <ni...@gmail.com>.
In maven, you might want to try following :-

-DwildcardSuites=org.apache.spark.ml.ProbabilisticClassifierSuite

On Tue, Nov 3, 2015 at 2:42 PM, Michael Armbrust <mi...@databricks.com>
wrote:

> In SBT:
>
> build/sbt "mllib/test-only *ProbabilisticClassifierSuite"
>
> On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
> stefano.baghino@radicalbit.io> wrote:
>
>> Hi all,
>>
>> I'm new to contributing to Spark (and Apache projects in general); I've
>> started working on SPARK-7425
>> <https://issues.apache.org/jira/browse/SPARK-7425> and have implemented
>> what looks like a viable solution. Now I'd like to test it, however I'm
>> having some trouble running an individual test class to quickly iterate
>> over it; I tried running
>>
>> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>>
>> and (without the fully qualified class name)
>>
>> mvn -Dtest=ProbabilisticClassifierSuite test
>>
>> but both commands resulted in running all tests, both when launching
>> Maven from the project root and from the MLlib module root. I've tried to
>> look this up in the mailing list archives but haven't had luck so far.
>>
>> How can I run a single test suite? Thanks in advance!
>>
>> --
>> BR,
>> Stefano Baghino
>>
>
>


-- 
Regards
Nitin Goyal

Re: Running individual test classes

Posted by Michael Armbrust <mi...@databricks.com>.
In SBT:

build/sbt "mllib/test-only *ProbabilisticClassifierSuite"

On Tue, Nov 3, 2015 at 9:27 AM, Stefano Baghino <
stefano.baghino@radicalbit.io> wrote:

> Hi all,
>
> I'm new to contributing to Spark (and Apache projects in general); I've
> started working on SPARK-7425
> <https://issues.apache.org/jira/browse/SPARK-7425> and have implemented
> what looks like a viable solution. Now I'd like to test it, however I'm
> having some trouble running an individual test class to quickly iterate
> over it; I tried running
>
> mvn -Dtest=org.apache.spark.ml.ProbabilisticClassifierSuite test
>
> and (without the fully qualified class name)
>
> mvn -Dtest=ProbabilisticClassifierSuite test
>
> but both commands resulted in running all tests, both when launching Maven
> from the project root and from the MLlib module root. I've tried to look
> this up in the mailing list archives but haven't had luck so far.
>
> How can I run a single test suite? Thanks in advance!
>
> --
> BR,
> Stefano Baghino
>