Given some possible inconveniences with the TestRunner, I am moving this to the treated inbox for now.<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 2019-08-14T19:14:56+00:00, christoph.thiede@student.hpi.uni-potsdam.de wrote:<br>
<br>
> > What are the specific information in the test runner you are referring to?<br>
> <br>
> It is "reentrant", you do not need to re-run all tests after debugging one. A DialogBox would need to be manually set as non-exclusive.<br>
> <br>
> <br>
> > If the test runner would be a better option than the dialog, wouldn't we want to show it even if only a single test fails (result defects size = 1)?<br>
> <br>
> You're right, we could :)<br>
> <br>
> <br>
> <br>
> Basically, I proposed these change because I did not really found a DialogBox comfortable for this purpose.<br>
> <br>
> It is modally exclusive but not reentrant.<br>
> <br>
> (I believe long test selector were displayed abbreviated, but I can't reproduce that.)<br>
> <br>
> Also, DialogBoxes are not resizable.<br>
> <br>
> <br>
> <br>
> On the other hand, I actually avoided using TestRunner in the last time, as it has a few convenience drawbacks:<br>
> <br>
> 1. I repeatedly faced an issue where a test, after debugging it, was not tear-downed correctly. Will try to reproduce that.<br>
> <br>
> 2. You cannot select a test without running it (impractical if you would like to open the menu, for example to browse it). Vice versa, you cannot run a test without selecting it, so the keyboard handling (such as navigation using arrow keys) is quite restricted ...<br>
> <br>
> 3. TestRunner is not aware of any additions to the test list (maybe we need something like #didCodeChangeElsewhere)<br>
> <br>
> <br>
> But your words "specific information" sound interesting to me. Would it be an option to turn the TestRunner upside down, aiming to display the last error information for each test?<br>
> <br>
> Some wild ideas :-)<br>
> <br>
>   *   allow selection of single test cases; instead of separately displaying all errors/failures, display their success with an icon<br>
>   *   add another panel to display information for the selected test<br>
>      *   this might include the failing line of the test method, the full error message (displayed in a big TextMorph, not as a one-liner with insufficient space), maybe the context stack - basically something like a collapsed debugger view<br>
>      *   I had an idea in the back of my mind for a few months: One could set up a small extension-based framework that provides additional information about the failing assertion (if you're interested, I can tell you more) - we could display these information here<br>
>         *   for example, in [self assert: [string allSatisfy: #isDigit]], instead of "AssertionFailed", the failure description could be something like "expected all elements of <'123a5'> to satisfy <#isDigit>, but <'a'> at index <4> didn't"<br>
>         *   ideally, the information would not be restricted to textual representation (why not import a diff view or an Inspector into the TestRunner? :) )<br>
>      *   It would be also possible to display *all* failures, not only the first one (I once read about resumable TestFailure implementations, why is TestFailure not marked as resumable by default?)<br>
>   *   If there are only few tests, maybe the test runner could suspend the failing/erroneous ones (actually their threads) instead of shutting them down? The user could then resume a test and directly jump to the raised Exception in debugger, without needing to wait for the test to re-run. Especially in case of heavy tests this might be a great help to some users.<br>
>   *   By always displaying the source of the selected test method, we could improve the overall liveness of SUnit<br>
> <br>
> It's not a bunch, it's a forest of ideas, I know :) What do you think about them? Or are you already happy with the current TestRunner?<br>
> <br>
> Best,<br>
> Christoph<br>
> <br>
> ________________________________<br>
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
> Gesendet: Mittwoch, 14. August 2019 17:03 Uhr<br>
> An: John Pfersich via Squeak-dev<br>
> Betreff: Re: [squeak-dev] The Inbox: SUnitTools-ct.5.mcz<br>
> <br>
> Hmmm.... What are the specific information in the test runner you are referring to? If the test runner would be a better option than the dialog, wouldn't we want to show it even if only a single test fails (result defects size = 1)?<br>
> <br>
> Best,<br>
> Marcel<br>
> <br>
> Am 31.05.2019 14:15:43 schrieb commits at source.squeak.org <commits at source.squeak.org>:<br>
> <br>
> A new version of SUnitTools was added to project The Inbox:<br>
> http://source.squeak.org/inbox/SUnitTools-ct.5.mcz<br>
> <br>
> ==================== Summary ====================<br>
> <br>
> Name: SUnitTools-ct.5<br>
> Author: ct<br>
> Time: 31 May 2019, 2:15:36.714053 pm<br>
> UUID: 397d3b85-7ac5-3645-baa9-b9f848d90880<br>
> Ancestors: SUnitTools-tcj.4<br>
> <br>
> Change CodeHolder>>testRunSuite: -- if multiple tests fail, instead of a UIManager dialog, open a TestRunner window that provides specific information.<br>
> <br>
> Depends on SUnitGUI-ct.70.<br>
> <br>
> =============== Diff against SUnitTools-tcj.4 ===============<br>
> <br>
> Item was changed:<br>
> ----- Method: CodeHolder>>testRunSuite: (in category '*SUnitTools-running') -----<br>
> testRunSuite: suite<br>
> <br>
> + | runner result |<br>
> + (suite isKindOf: TestCase)<br>
> + ifFalse: [<br>
> + runner := TestRunner newForSuite: suite.<br>
> + result := runner runAll; result]<br>
> + ifTrue: [result := suite run].<br>
> - | result |<br>
> - result := suite run.<br>
> <br>
> (result respondsTo: #dispatchResultsIntoHistory)<br>
> ifTrue: [result dispatchResultsIntoHistory].<br>
> <br>
> result hasPassed ifTrue: [^ self].<br>
> <br>
> + result defects size = 1<br>
> + ifTrue: [result defects anyOne debug]<br>
> + ifFalse: [runner open]!<br>
> - (result defects size = 1<br>
> - ifTrue: [result defects anyOne]<br>
> - ifFalse: [UIManager default<br>
> - chooseFrom: (result defects collect: [:each | each class name , '>>' , each selector printString])<br>
> - values: result defects<br>
> - title: ('{1} passes, {2} failures, {3} errors\\Debug a failure or error?' format: {<br>
> - result runCount . result failureCount . result errorCount}) withCRs]<br>
> - ) ifNotNil: [:defect | defect debug].<br>
> - !<br>
> <br>
> <br>
> -------------- next part --------------<br>
> An HTML attachment was scrubbed...<br>
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190814/3e576b10/attachment.html><br>
> <br>