help with tests

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

help with tests

Usman Bhatti
I need some help with tests.
I have a set of classes for UI testing. There's an abstract super class that defines abstract methods for testing (title, classtotest, model etc). Then each subclass defines its own tests. It works so far until I have each subclass defining each its own specific tests. Now, I need to add a test that is common to all subclasses so a candidate to be placed in the super class, but my superclass only defines a framework for tests, hence this test wont have the data to execute the test and this would not execute correctly in my abstract super class.

My questions: 1) Is there anyway to say not to execute the tests in the abstract class. 2) inherit tests from an abstract super class?

Apparently, #shouldInheritSelectors does not work for abstract classes or I am not understanding some design rules.

tx,

usman
Reply | Threaded
Open this post in threaded view
|

Re: help with tests

Sean P. DeNigris
Administrator
Usman Bhatti wrote
1) Is there anyway to say not to execute the tests in the
abstract class.
override class-side #isAbstract

Usman Bhatti wrote
2) inherit tests from an abstract super class?
Works for me out of the box. n.b. you must be a little creative in #isAbstract so that it doesn't answer true for the subclass (see examples in the image).
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: help with tests

Usman Bhatti
tx, it was helpful.


On Sat, Mar 30, 2013 at 3:52 PM, Sean P. DeNigris <[hidden email]> wrote:
Usman Bhatti wrote
> 1) Is there anyway to say not to execute the tests in the
> abstract class.

override class-side #isAbstract


Usman Bhatti wrote
> 2) inherit tests from an abstract super class?

Works for me out of the box. n.b. you must be a little creative in
#isAbstract so that it doesn't answer true for the subclass (see examples in
the image).



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/help-with-tests-tp4678969p4678985.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.