Re: Latest Dolphin patches have broken Unit Test running of individual suites



Blair,

It appears to me that there are two issues: (1) inherited tests went missing
in 6.02 (making the SUnitBrowser largely worthless in many cases); and (2)
the tests are split out of their class-based suites and each test is put in
a separate suite (making the two-pane UI and the count columns pointless).

The first issue appears to be related to PackageSelector>>buildTestSuite
which filters out all inherited tests. A simple work-around is to modify the
#ifTrue: block to be [suite addTest: eachClass suite].

The second issue appears to be related to both
PackageSelector>>buildTestSuite (which needs the fix in the prior paragraph)
and TestSuite>>buildSuite, where the modification provided by "macta" on
2/14/2006 seems to work (if combined with the other fix).

Do you think these two issues can be noted as bugs/feature requests?

James Foster

"Blair McGlashan" <blair@xxxxxx> wrote in message
news:45dlb7F67e8gU1@xxxxxxxxxxxxxxxxx
"TimM" <365nice@xxxxxxxxx> wrote in message
news:1139839884.966824.73120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I was just packaging up a new release of Intelli-Dolphin and have
noticed that when I run unit tests now (in a clean image without
intelli) - the test runner now creates a suite for every test method.
This seems to have happened in the latest patches (although I had to
download the latest Dolphin setup as I couldn't apply patch 2 as it
said my installer was out of date).

Thus if I right click on a TestCase and pick Run Tests - I USED TO get
a single suite in the left pane of the test runner, and picking that
suite would then show me the test cases (e.g. one for each test
method).


The behaviour in 6.02 has reverted to the behaviour in Dolphin 5.x, which
I assume is the way that Jeff had originally intended it should work.
There was a bug in the original D6 release in that the SUnit Browser shown
by browsing the test cases on a class did not include inherited test
cases. This wasn't intentional, but I don't think it is "broken". If the
browser is invoked to display either all tests in your image, or all tests
in a package, then you will get the TestCases appearing as suites, when
browsing a single test case it is expanded out. Logically the original D6
behaviour was perhaps more correct, but the D5 behaviour seems more usable
in practice.

What does everyone think, should it display a single suite, or expand it
out in the main list?

It may be releated to something that has changed in the latest patches
- in Intelli I notice that where I used to do:

filteredClasses
do: [:each | testSuite addTest: (each buildSuiteFromEnvironment:
BrowserEnvironment new)].

The #buildSuiteFromEnvironment: method is now gone. It seems like I now
should write:

filteredClasses
do: [:each | testSuite addTest: (each buildSuiteFromSelectors)].


I'm not sure, since I don't know what you are trying to achieve.
#buildSuiteFromEnvironment: was an extension method that we'd added, its
purpose being as named (i.e. to construct a TestSuite from only those test
cases defined in a BrowserEnvironment). It was implemented in order to
support browsing tests by package (i.e. to allow a TestCase to have loose
test cases that would be selectively shown when one initiated from the
System Browser based on package selection). However it was complex and
didn't work correctly. Rather than attempt to correct it, we removed it
and reverted to the basic TestSuite construction methods by SUnit.

Regards

Blair



.



Relevant Pages

  • Re: Latest Dolphin patches have broken Unit Test running of individual suites
    ... It appears to me that there are two issues: inherited tests went missing ... a separate suite. ... There was a bug in the original D6 release in that the SUnit Browser shown ... support browsing tests by package (i.e. to allow a TestCase to have loose ...
    (comp.lang.smalltalk.dolphin)
  • Re: sun acquires MySQL
    ... competition to MS Office as a full suite. ... Only if it is packaged to package everything in a database (data, ... ..the Sin of Ignorance, ...
    (Fedora)
  • Re: Art of Unit Testing
    ... phil hunt wrote: ... For unit tests, the entire suite should take only a minute or two, max, if possible, and preferably well under a minute. ... In that case, there's nothing that says you can't run individual test files, or even individual test cases, when you are focused on one small area of the code. ... If you have a helpful "test runner" utility which scans subdirectories for test cases, you can easily run all the tests in a given package independently of the rest of the app while you are working on that one package, reducing the risk inherent in running only a subset of your full test suite. ...
    (comp.lang.python)
  • Re: Latest Dolphin patches have broken Unit Test running of individual suites
    ... intelli) - the test runner now creates a suite for every test method. ... was a bug in the original D6 release in that the SUnit Browser shown by ...
    (comp.lang.smalltalk.dolphin)
  • Re: Will Microsoft Works run...
    ... Microsoft word and works are 2 different things. ... Works is a package that includes several programs where word is ONE ... both the WORKS suite and the OFFICE suite. ... which is the Word selection and the Works ...
    (microsoft.public.windowsxp.basics)