SUnit: Skipping tests?
Markus Gaelli
gaelli at emergent.de
Mon Mar 27 10:04:18 UTC 2006
On Mar 27, 2006, at 11:18 AM, Adrian Lienhard wrote:
> Maybe the "expected failures" feature of SUnit would do the job?
> You let the tests in question fail but mark them as expected
> failures depending on whether the resources are loaded or not.
> Visually, the test runner will run yellow but explicitly state that
> it expected to so.
...which also could be denoted in the test by
BarTes >> testFoo
self precondition: [Bar includesSelector: #foo]
Test which are known not to be implemented yet could then be easily
selected asking for preconditions including #includesSelector...
Cheers,
Markus
>
> Adrian
>
>
> On Mar 27, 2006, at 11:09 , Andreas Raab wrote:
>
>> Markus Gaelli wrote:
>>> If it's not possible to put the data zipped into a method because
>>> it would be too big somehow, I'd consider your two examples
>>> logically equivalent to "If the moon is made out of green cheese
>>> anything is allowed". So it is kind of ok that these tests are
>>> green.
>>
>> It's 8MB a pop so no, I think it's not really feasible to stick
>> that test data into a method ;-)
>>
>>> And you are suggesting to indicate clearly, which tests depend on
>>> some external resource?
>>
>> Well, really, what I'm looking for is something that instead of
>> saying "all tests are green, everything is fine" says "all the
>> tests we ran were green, but there were various that were *not*
>> run so YMMV". I think what I'm really looking for is something
>> that instead of saying "x tests, y passed" either says "x tests, y
>> passed, z skipped" or simply doesn't include the "skipped" ones in
>> the number of tests being run. In either case, looking at
>> something that says "19 tests, 0 passed, 19 skipped" or simply "0
>> tests, 0 passed" is vastly more explicit than "19 tests, 19
>> passed" where in reality 0 were run.
>>
>> Like, what if a test which doesn't have any assertion is simply
>> not counted? Doesn't make sense to begin with, and then all the
>> preconditions need to do is to bail out and the test doesn't count...
>>
>> In any case, my complaint here is more about the *perception* of
>> "these tests are all green, everything must be fine" when in fact,
>> none of them have tested anything.
>>
>> Cheers,
>> - Andreas
>>
>
>
More information about the Squeak-dev
mailing list
|