TestRunner author while running tests

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

TestRunner author while running tests

Lukas Renggli
The fact that the test runner sets the author name to 'TestRunner'
while running the tests is really annoying.

I write a lot of code in the debugger while running tests and then all
the methods end up with the wrong author name.

I would vote for changing that back to the old behavior.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
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 author while running tests

hernan.wilkinson
I did know about this change but I completely agree with you...

On Sat, Jan 9, 2010 at 10:10 PM, Lukas Renggli <[hidden email]> wrote:
The fact that the test runner sets the author name to 'TestRunner'
while running the tests is really annoying.

I write a lot of code in the debugger while running tests and then all
the methods end up with the wrong author name.

I would vote for changing that back to the old behavior.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
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 author while running tests

Stéphane Ducasse
In reply to this post by Lukas Renggli
adrian K mentioned that he fixed it but I have no idea where he publish his code
If you understand and find it let me know.
About about reverting I do not know what to revert ;)

Stef

On Jan 10, 2010, at 2:10 AM, Lukas Renggli wrote:

> The fact that the test runner sets the author name to 'TestRunner'
> while running the tests is really annoying.
>
> I write a lot of code in the debugger while running tests and then all
> the methods end up with the wrong author name.
>
> I would vote for changing that back to the old behavior.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> 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 author while running tests

Lukas Renggli
Looks like the code of Adrian Lienhard ;-)

I guess that it tries to fix tests so that they do not pup-up a dialog
when they compile code.

Initially the code in SUnit was like this:

TestCase>>runCase
        [self setUp.
        self performTest]
                ensure: [
                        self tearDown.
                        self cleanUpInstanceVariables ] ]

Then it was change to this (this is where I discovered the issue):

TestCase>>runCase
        Author
                useAuthor: 'TestRunner'
                during: [
                        [self setUp.
                        self performTest]
                                ensure: [
                                        self tearDown.
                                        self cleanUpInstanceVariables ] ]

In the latest version it was changed again:

TestCase>>runCase
        Author
                ifUnknownAuthorUse: 'TestRunner'
                during: [
                        [self setUp.
                        self performTest]
                                ensure: [
                                        self tearDown.
                                        self cleanUpInstanceVariables ] ]

In any case the author name is 'TestRunner' if you edit source code
anywhere in the system when a debugger on a test is open. Also I am
not sure what happens if you have multiple debuggers on tests open,
that might give very strange situations.

I suggest that we revert to the earliest presented version of the
method in question, and fix the particular tests that compile code.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
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 author while running tests

Stéphane Ducasse
ok
http://code.google.com/p/pharo/issues/list?thanks=1769

On Jan 10, 2010, at 9:40 AM, Lukas Renggli wrote:

> Looks like the code of Adrian Lienhard ;-)
>
> I guess that it tries to fix tests so that they do not pup-up a dialog
> when they compile code.
>
> Initially the code in SUnit was like this:
>
> TestCase>>runCase
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> Then it was change to this (this is where I discovered the issue):
>
> TestCase>>runCase
> Author
> useAuthor: 'TestRunner'
> during: [
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> In the latest version it was changed again:
>
> TestCase>>runCase
> Author
> ifUnknownAuthorUse: 'TestRunner'
> during: [
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> In any case the author name is 'TestRunner' if you edit source code
> anywhere in the system when a debugger on a test is open. Also I am
> not sure what happens if you have multiple debuggers on tests open,
> that might give very strange situations.
>
> I suggest that we revert to the earliest presented version of the
> method in question, and fix the particular tests that compile code.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> 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 author while running tests

Adrian Lienhard
In reply to this post by Lukas Renggli
The reason for this change (which I did with Oscar at Lille) was to  
avoid the author dialog when running tests. It is very annoying  
because when you run all the tests, get a coffee, and later come back,  
the test runner would wait for your input halfway through.

Now the first solution below had the annoying problem that  
'TestRunner' ends up as your initials when you compiled a method and  
the testrunner has not returned, e.g., because you have a halt in the  
code. To improve this, I slightly changed the behavior as follows:  
(comment from issue #1379):

A preliminary fix is in #10494. Now the name 'TestRunner' is only used  
if no author was set before starting the tests. The implementation of  
temporarily setting another author name is too simple to cope with the  
suspending of a process and opening
a debugger from a failed assertion. In this case, one would ideally  
want to use the real author. The desired behavior could be implemented  
using a dynamic variable to request the author. The test runner could  
then catch the notification and return the temporary author. This  
would then not interfere with compiling methods in the debugger  
because it runs in a different call stack.

As Lukas suggests, instead fixing the offending tests is also a  
possible solution. If possible, though, I would prefer a generic  
solution.

Adrian

On Jan 10, 2010, at 09:40 , Lukas Renggli wrote:

> Looks like the code of Adrian Lienhard ;-)
>
> I guess that it tries to fix tests so that they do not pup-up a dialog
> when they compile code.
>
> Initially the code in SUnit was like this:
>
> TestCase>>runCase
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> Then it was change to this (this is where I discovered the issue):
>
> TestCase>>runCase
> Author
> useAuthor: 'TestRunner'
> during: [
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> In the latest version it was changed again:
>
> TestCase>>runCase
> Author
> ifUnknownAuthorUse: 'TestRunner'
> during: [
> [self setUp.
> self performTest]
> ensure: [
> self tearDown.
> self cleanUpInstanceVariables ] ]
>
> In any case the author name is 'TestRunner' if you edit source code
> anywhere in the system when a debugger on a test is open. Also I am
> not sure what happens if you have multiple debuggers on tests open,
> that might give very strange situations.
>
> I suggest that we revert to the earliest presented version of the
> method in question, and fix the particular tests that compile code.
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> 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 author while running tests

Stéphane Ducasse
Yes apparently adrian K mentioned that he fixes the problem
I should have a look at his code.

Now I could not find the mcz file.

Stef
On Jan 10, 2010, at 11:51 AM, Adrian Lienhard wrote:

> The reason for this change (which I did with Oscar at Lille) was to  
> avoid the author dialog when running tests. It is very annoying  
> because when you run all the tests, get a coffee, and later come back,  
> the test runner would wait for your input halfway through.
>
> Now the first solution below had the annoying problem that  
> 'TestRunner' ends up as your initials when you compiled a method and  
> the testrunner has not returned, e.g., because you have a halt in the  
> code. To improve this, I slightly changed the behavior as follows:  
> (comment from issue #1379):
>
> A preliminary fix is in #10494. Now the name 'TestRunner' is only used  
> if no author was set before starting the tests. The implementation of  
> temporarily setting another author name is too simple to cope with the  
> suspending of a process and opening
> a debugger from a failed assertion. In this case, one would ideally  
> want to use the real author. The desired behavior could be implemented  
> using a dynamic variable to request the author. The test runner could  
> then catch the notification and return the temporary author. This  
> would then not interfere with compiling methods in the debugger  
> because it runs in a different call stack.
>
> As Lukas suggests, instead fixing the offending tests is also a  
> possible solution. If possible, though, I would prefer a generic  
> solution.
>
> Adrian
>
> On Jan 10, 2010, at 09:40 , Lukas Renggli wrote:
>
>> Looks like the code of Adrian Lienhard ;-)
>>
>> I guess that it tries to fix tests so that they do not pup-up a dialog
>> when they compile code.
>>
>> Initially the code in SUnit was like this:
>>
>> TestCase>>runCase
>> [self setUp.
>> self performTest]
>> ensure: [
>> self tearDown.
>> self cleanUpInstanceVariables ] ]
>>
>> Then it was change to this (this is where I discovered the issue):
>>
>> TestCase>>runCase
>> Author
>> useAuthor: 'TestRunner'
>> during: [
>> [self setUp.
>> self performTest]
>> ensure: [
>> self tearDown.
>> self cleanUpInstanceVariables ] ]
>>
>> In the latest version it was changed again:
>>
>> TestCase>>runCase
>> Author
>> ifUnknownAuthorUse: 'TestRunner'
>> during: [
>> [self setUp.
>> self performTest]
>> ensure: [
>> self tearDown.
>> self cleanUpInstanceVariables ] ]
>>
>> In any case the author name is 'TestRunner' if you edit source code
>> anywhere in the system when a debugger on a test is open. Also I am
>> not sure what happens if you have multiple debuggers on tests open,
>> that might give very strange situations.
>>
>> I suggest that we revert to the earliest presented version of the
>> method in question, and fix the particular tests that compile code.
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> 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


_______________________________________________
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 author while running tests

Damien Cassou
In reply to this post by Adrian Lienhard
2010/1/10 Adrian Lienhard <[hidden email]>:
> The reason for this change (which I did with Oscar at Lille) was to
> avoid the author dialog when running tests. It is very annoying
> because when you run all the tests, get a coffee, and later come back,
> the test runner would wait for your input halfway through.

what about ensuring that the author name is set before running the
tests? i.e., when #runCase is executed, the system asks for the author
name if it is not already set.


--
Damien Cassou
http://damiencassou.seasidehosting.st

"Lambdas are relegated to relative obscurity until Java makes them
popular by not having them." James Iry

_______________________________________________
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 author while running tests

Stéphane Ducasse
For me I'm ok with several solutions.
I just do not have cycle now for anything more than integrating.

I should check what adrian.k did.

On Jan 11, 2010, at 6:06 PM, Damien Cassou wrote:

> 2010/1/10 Adrian Lienhard <[hidden email]>:
>> The reason for this change (which I did with Oscar at Lille) was to
>> avoid the author dialog when running tests. It is very annoying
>> because when you run all the tests, get a coffee, and later come back,
>> the test runner would wait for your input halfway through.
>
> what about ensuring that the author name is set before running the
> tests? i.e., when #runCase is executed, the system asks for the author
> name if it is not already set.
>
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Lambdas are relegated to relative obscurity until Java makes them
> popular by not having them." James Iry
>
> _______________________________________________
> 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 author while running tests

Lukas Renggli
In reply to this post by Adrian Lienhard
> As Lukas suggests, instead fixing the offending tests is also a
> possible solution. If possible, though, I would prefer a generic
> solution.

I think forcing authors to make sure that their tests run cleanly
would be a better solution than to introduce a lot of infrastructure
to handle sloppy written tests.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

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