TestRunner ENH

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

TestRunner ENH

Stéphane Ducasse
I would like to have some feedback on
        http://code.google.com/p/pharo/issues/detail?id=1392

Issue 1392: Adapted SUnit TestRunner can not be integrated easily in  
environment

I've build some extension on SUnit:

http://www.squeaksource.com/SUnitsSlowNFast/
. It automagically can run
fast and slow tests (based on yesterdays weather).

However if i want to integrate this testrunner instead of the standard
testrunner, there is no way 2 do it without changing existing code. I  
want
something that i can configure my testrunner instead of the default one.

If i look at the
StandardToolSet>>class>>openTestRunner
    Smalltalk at: #TestRunner ifPresent: [ :class | ^ class open ].

You notice that TestRunner is hardcoded chosen.

My suggestion is to adapt the same solution as in the

StandardToolSet>>class>>openClassBrowser
        SystemBrowser default open

message: another layer of indirection solves every problem and  
introduce a
TestRunnerBrowser class, which is a subclass of AppRegistry, and there  
the
default TestRunner is configured (which should be initialized in
TestRunner>>class>>initialize using self). So that if i load my new
TestRunner (which is a subclass of the TestRunner class) included in my
SUnitsSlowNFast package, mine is automagically configured in the
environment as the default one.

In attachments i've created a solution.



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: TestRunner ENH

Mariano Martinez Peck


On Wed, Nov 4, 2009 at 12:57 PM, Stéphane Ducasse <[hidden email]> wrote:
I would like to have some feedback on
       http://code.google.com/p/pharo/issues/detail?id=1392

Issue 1392:     Adapted SUnit TestRunner can not be integrated easily in
environment

I've build some extension on SUnit:

http://www.squeaksource.com/SUnitsSlowNFast/
. It automagically can run 
fast and slow tests (based on yesterdays weather).


Besides the problem you ask, about being able to integrate this to the core image, I don't understand the features or goal of your TestRunner.

Why would I want to run my tests faster or slower ? I would always choose fast ahahahha

Of course, there is something I am missing.

Kind regards,

Mariano


 
However if i want to integrate this testrunner instead of the standard
testrunner, there is no way 2 do it without changing existing code. I
want
something that i can configure my testrunner instead of the default one.

If i look at the
StandardToolSet>>class>>openTestRunner
   Smalltalk at: #TestRunner ifPresent: [ :class | ^ class open ].

You notice that TestRunner is hardcoded chosen.

My suggestion is to adapt the same solution as in the

StandardToolSet>>class>>openClassBrowser
       SystemBrowser default open

message: another layer of indirection solves every problem and
introduce a
TestRunnerBrowser class, which is a subclass of AppRegistry, and there
the
default TestRunner is configured (which should be initialized in
TestRunner>>class>>initialize using self). So that if i load my new
TestRunner (which is a subclass of the TestRunner class) included in my
SUnitsSlowNFast package, mine is automagically configured in the
environment as the default one.

In attachments i've created a solution.



_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: TestRunner ENH

keith1y
>
>
> Why would I want to run my tests faster or slower ? I would always  
> choose fast ahahahha
>
> Of course, there is something I am missing.
>
> Kind regards,
>
> Mariano
>


In SUnit-improved TestRunner the time taken to run each test was  
recorded.

Then there is an option to automatically categorize tests as (slow) ,  
(long) or (net), where you can configure what time span is considered  
"slow", or "long"

Then on subsequent runs you can organize to run the quick tests first,  
and you get something like 90%+ coverage in the first minute, with the  
slow and long tests to follow.

Keith

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: TestRunner ENH

Mariano Martinez Peck


On Wed, Nov 4, 2009 at 10:34 PM, keith <[hidden email]> wrote:
>
>
> Why would I want to run my tests faster or slower ? I would always
> choose fast ahahahha
>
> Of course, there is something I am missing.
>
> Kind regards,
>
> Mariano
>


In SUnit-improved TestRunner the time taken to run each test was
recorded.

Then there is an option to automatically categorize tests as (slow) ,
(long) or (net), where you can configure what time span is considered
"slow", or "long"

Then on subsequent runs you can organize to run the quick tests first,
and you get something like 90%+ coverage in the first minute, with the
slow and long tests to follow.

 
 
Thanks Keith!  That makes sense. So, it would be something like "run only the faster ones" than "run them fast"
As the button says "run fast" I understood the second intention.
Thanks!
Mariano
 
Keith

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project