Hi all, I have a testing class that is sub-subclass of TestCase, i.e., the class hierarchy looks like this: TestCase ExistingTestingClass MyNewTestingClass How do I get TestRunner to run MyNewTestingClass's tests, as well as ExistingTestingClass's tests in the context of MyNewTestingClass? Pierce
Hi Pierce - not sure I understand what you are trying to do - I tend to run all tests in a package which it cmd-t in calypso, but I sometimes need to run lots of disjoint tests, so I created a fake test and overrode the suite method eg: TestCase subclass: #AllExercismTests instanceVariableNames: '' classVariableNames: '' package: âExercismSystemTests' suite ^ self allExercismTests inject: TestSuite new into: [ :suite :test | suite addTest: test buildSuiteFromSelectors ] To get the tests I use this helper method - but do whatever you need if its not package based (thinking to myself, I could modify this to get my tests from the baseline) allExercismTestsFor: packagesNameList "gather all the TestCases in the Execercsim package" ^ packagesNameList inject: Set new into: [ :finalResult :pkgName | (RPackageOrganizer default packageNamed: pkgName) packages inject: finalResult into: [ :result :pkg | result addAll: (pkg classes select: [ :c | c isTestCase ]); yourself ] ] And then have a fake test so you can click the green orb: testAll "Create a suite to eaily run all the tests - this is a stub that gives a browser button to easily click on to run all the composite tests" ^true
On 23 May 2019, at 11:16, Pierce Ng <pierce@samadhiweb.com> wrote:
Hi all,
I have a testing class that is sub-subclass of TestCase, i.e., the class hierarchy looks like this:
TestCase ExistingTestingClass MyNewTestingClass
How do I get TestRunner to run MyNewTestingClass's tests, as well as ExistingTestingClass's tests in the context of MyNewTestingClass?
Pierce
On Thu, May 23, 2019 at 12:17 PM Pierce Ng <pierce@samadhiweb.com> wrote:
Hi all,
I have a testing class that is sub-subclass of TestCase, i.e., the class hierarchy looks like this:
TestCase ExistingTestingClass MyNewTestingClass
How do I get TestRunner to run MyNewTestingClass's tests, as well as ExistingTestingClass's tests in the context of MyNewTestingClass?
Hi, Currently, to inherit tests you need to override #shouldInheritSelectors to return true.
Pierce
-- Cyril Ferlicot https://ferlicot.fr
Oh yeah - I forgot about that one too⦠and another developer wastes time on that strange decision (we really must get it changed, its just not what you expect)
On 23 May 2019, at 13:14, Cyril Ferlicot <cyril.ferlicot@gmail.com> wrote:
Currently, to inherit tests you need to override #shouldInheritSelectors to return true.
Pierce
-- Cyril Ferlicot https://ferlicot.fr
participants (3)
-
Cyril Ferlicot -
Pierce Ng -
Tim Mackinnon