Hi all,<br>
<br>
would anyone object if I merged this patch into the Trunk? tl;dr: Revives/extends the mechanism for resumable failures on assertions. I'd love to have this in Trunk, then in the next step we could add support for it in smalltalkCI! :-)<br>
<br>
Best,<br>
Christoph<br>
<br>
<font color="#808080">---<br>
</font><font color="#808080"><i>Sent from </i></font><font color="#808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><font color="#808080">Squeak Inbox Talk</font></u></a></i></font><br>
<br>
On 2020-09-28T23:39:21+00:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:<br>
<br>
> PS: I ran all tests in a fresh trunk image before and after loading the changeset, there were no regressions.<br>
> <br>
> <http://www.hpi.de/><br>
> ________________________________<br>
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
> Gesendet: Dienstag, 29. September 2020 01:18:07<br>
> An: Squeak Dev<br>
> Betreff: [squeak-dev] ResumableTestFailure<br>
> <br>
> <br>
> Hi all! :-)<br>
> <br>
> <br>
> I was just working a bit with Squeak by Example (the book) and found out that resumable assertions as described in the book (see chapter SUnit, Advanced, Continuing after a failure) do not any longer work in a trunk image. If you write a test case with some resumable assertions, turn on logging, and run the test, only the first failure will be logged, not the rest, too.<br>
> <br>
> <br>
> (Methods to reproduce:<br>
> <br>
> isLogging<br>
> <br>
>     ^  true "You will need to open a Transcript"<br>
> <br>
> testResumable<br>
> <br>
>     #(1 2 3 4 5) do: [:i |<br>
> <br>
>         self assert: i even description: ['{1} is not even' format: {i}] resumable: true]<br>
> <br>
> )<br>
> <br>
> <br>
> A second issue I experienced frequently when I felt the desire to work with resumable assertions was that they are basically only available for two selectors: #assert:description:resumable: and #deny:description:identical:. I often would like to insert a resumable into any test without being that verbose, and nearly redoubling the number of assertion selectors by adding a resumable argument to each of them did not feel right, either.<br>
> <br>
> <br>
> Please find the attached changeset, which fixes both issues.<br>
> <br>
>   *   In TestResult >> #runCase:, resumable assertions are identified and - finally - resumed, after marking the test as failed. Unfortunately, other test runners (yes, I'm thinking of smalltalkCI) will need to reimplement this feature unless they reuse the TestResult implementation.<br>
>   *   In TestCase, I refactored some methods that raise assertion failures and added the most basic #signalFailure:resumable: as the single source of signalization. Instead of setting the resumable bit manually for each assertion, you now can also make the whole test execution resumable by:<br>
>      *   overriding #isResumable,<br>
>      *   setting a resumable flag using #resumable:,<br>
>      *   setting a resumable flag temporarily using #beResumable:during:, or<br>
>      *   adding a <resumable> or <resumable: true> pragma to the test method.<br>
>   *   In addition, I tested the added and fixed behavior in ResumableTestFailureTestCase.<br>
> <br>
> <br>
> Looking forward to your review! :-)<br>
> <br>
> <br>
> Best,<br>
> <br>
> Christoph<br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200928/b43d1b7e/attachment-0001.html><br>
> <br>