Menu

#152 skip() - no useful overwrite possible

open
5
2008-08-14
2008-08-13
one-mb
No

Hi,

currently SimpleTestCase::run fires skip() and checks for it's outcome by checking _should_skip

linie 133:
$this->skip();
if ($this->_should_skip) {
break;
}

I tried to overwrite skip in my testcases, but found no way to check within their context scopes, what test method is actually about to be invoked.

That way I there is no chance of skipping 'currently-not-yet-or-faulty-implemented' tests

Most simple solution whould be to pass $method from line 132 to Skip()

I really miss this feature which is known in phpUnit (markIncomplete(), markSkipped()). Those calls from within the test need no further implementation and are listed in test summary (2 passed, 3 fails, 2 skipped, 1 incomlete)

Imho in TDD programmers shall be able to mark tests as "Incomplete". That way anyone may write tests that are obvious to be needed in future, but may not implemented by himself.
In opposition to that I don't see sense in giving the coder any choice to skipIf() or skipUnless().

Any Ideas, comments?

greets
Maik

Discussion

  • one-mb

    one-mb - 2008-08-14
    • assigned_to: nobody --> lastcraft
     
  • DerManoMann

    DerManoMann - 2008-10-08

    I second this.

    However, with some more research I found that it is possible to archive the same by customizing the reporter's shouldInvoke() method.

    I have to say, though, that even though this might be good enough for my needs, it seems not very logical to let the reporter control this. IMHO, the reporter should report, period.
    If this is needed other than in the test case class itself, the suite should be doing it.

    I plan on having a GUI where it is possible to enable/disable single tests/methods of a test case class/instance. It seems weird to tell the reporter which tests to run/skip, rather than the suite or test case instance itself.

    cheers, mano

     
  • one-mb

    one-mb - 2008-10-16

    a patch to this issue is filed under #2171485

     

Log in to post a comment.

MongoDB Logo MongoDB