TestRunner and OB, esier to run tests when subclassing?

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

TestRunner and OB, esier to run tests when subclassing?

Mariano Martinez Peck
Hi. Forget for a moment why I have subclasses in my tests. But I have them. Some people do not agree with this, but this is not what I want to discuss. Suppose I have an abstract test sub several subclasses.
In my case, all the tests (most of them) are in the superclass. But all tests use a method that I override in each concrete subclass.

So...I have 2 problems:

1) I cannot run a single test (cmd + t) from OB, from one of the abstract class, but a subclass as receiver. (remember I override).
This is the most complicated for me. I don't remember if it was squeak or VAST but I was able to select the scope of the visibility of methods while browsing methods. So for example, with OB, I would love to scope the methods if the method pane to: self (as it is now), self + all super classes , self + all super classes but not Object.
This way, I can just change the scope, see the tests and be able to run them directly from the subclass. In addition, I think this is very useful.

2) When I open a test runner, I don't want that my abstract class appears there, since you cannot run the tests. Is there a way to prevent this?

thanks in advance,

mariano
Reply | Threaded
Open this post in threaded view
|

Re: TestRunner and OB, esier to run tests when subclassing?

Noury Bouraqadi-2

On 26 nov. 2010, at 10:47, Mariano Martinez Peck wrote:

> Hi. Forget for a moment why I have subclasses in my tests. But I have them. Some people do not agree with this, but this is not what I want to discuss. Suppose I have an abstract test sub several subclasses.
> In my case, all the tests (most of them) are in the superclass. But all tests use a method that I override in each concrete subclass.
>
I do use subclassing in my tests too. It is useful to factor-out tests.

> 2) When I open a test runner, I don't want that my abstract class appears there, since you cannot run the tests. Is there a way to prevent this?
>
Don't think so. At least not in 1.1.
But, you mark the class abstract and the TestRunner will ignore it.

>
Noury