<div dir="ltr">What about implementing the messages #debugInSameInstance and changing the runner window in such a way to send  #debugInSameInstance if you do shift-click on the failed test and #debug if you do click as currently works? <div>If we do this you will not have to change or implement special messages in your code, just press a different key to debug the test using the same instance.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 25, 2023 at 2:20 AM Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">How about this new version? I use copy, but I implemented copy with the original behaviour. I'd prefer to not include this #copy method in the change set, you can remove it if you agree, but it's ok for me if you prefer to include it to keep the exact original behaviour... it makes more sense for me to redefine copy in a subclass rather than being forced to "hack" it by redefining debug and debugAsFailure. What do you think?<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 25, 2023 at 6:53 AM Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com" target="_blank">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I didn’t see anything about creating new instances or isolation in the paper.</div><div dir="auto">Anyway, how about creating a copy instead? ‘self copy’ instead of ‘self class selector: testSelector’. That will work for me, does that work for you?</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 25 May 2023 at 00:46 Hernán Wilkinson <<a href="mailto:hernan.wilkinson@10pines.com" target="_blank">hernan.wilkinson@10pines.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Iit is a well know/assumed characteristic of tests to be isolated… if you read the sunit paper you will see kent beck defining that (i think it was in that paper, now i’m not sure…) and all tests frameworks use thet characteristic …</div><div dir="auto">It is not me but the culture around testing that defined that 🤷‍♂️</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 May 2023 at 18:16 Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com" target="_blank">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Sure, I’ve been doing that for years. But really, I think there’s nothing wrong with running a test several times, to me it is more weird assuming that a new instance of exactly the same test can be created doing ‘aTest class selector: testSelector’, that assumes a lot about what a test is and how it is implemented, while the runner could assume much less and just think of a test as something that understands setUp/run/tearDown.</div><div dir="auto">But well, no problem…</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 24 May 2023 at 23:07 Hernán Wilkinson <<a href="mailto:hernan.wilkinson@10pines.com" target="_blank">hernan.wilkinson@10pines.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Luciano,<div> I understand your point but it is also true that some tests and people may not want to reuse the instance.</div><div> I think we should provide both options then. In your case you could redefine debug and debugAsFailure in the class you need that behavior or we could create a subclass of TestCase that redefines them for all the test cases that have to have that behaviour to subclass it.</div><div> What do you think?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 24, 2023 at 6:02 PM Luciano Notarfrancesco <<a href="mailto:luchiano@gmail.com" target="_blank">luchiano@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Hernan,</div><div dir="auto">Right, the thing about creating new instances of the test cases…</div><div dir="auto">I think that conceptually it’s not wrong to reuse the instances, the only problem is people programming incorrect tests that are not consistent between multiple cycles of setUp/run/tearDown. I need to reuse instances because I have tests that can be configured in different ways, for example a test for polynomials that can run on polynomials over different rings.</div><div dir="auto">And I also use randomness when initializing a test, so if you create a new instance it will be initialized differently and it wouldn’t be reproducible (for example a test fails, and when I click to debug it it will be another instance that maybe won’t fail anymore). My tests are completely deterministic, but what I call a “test” is an instance, not the class, different instances can be different tests, a test is not necessarily uniquely determined by the class and the selector. In fact, that’s what happens with parameterized tests that can be configured to test different things, like polynomials over the integers or polynomials over a finite field, etc.</div><div dir="auto">I don’t think this could affect other people’s tests, and I think tests are more useful without the restriction that we had before, as it opens more possibilities like the two examples I just mentioned. And as I said, maybe some test that is not properly programmed to be consistent between multiple cycles of setUp/run/tearDown could fail, but if that happens you should be happy, because then the problem shows up and you can fix it.</div><div dir="auto">My 2 cents,</div><div dir="auto">Luciano</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, 24 May 2023 at 22:20 Hernán Wilkinson <<a href="mailto:hernan.wilkinson@10pines.com" target="_blank">hernan.wilkinson@10pines.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Luciano<div> great changes to the runner!! I like them!</div><div> I have a few comments:</div><div>1) The changes in TestCase>>#debug and TestCase>>#debugAsFailureIfCanNot: can generate invalid results. The idea when running/debugging a test is not to reuse the previous instance of the test but to create a new one. Doing so the tests run isolated. Reusing the same instance can generate erratic results.</div><div>2) I fixed runSuiteProfiled:. It was doing: </div><div>...</div><div>self changed: #runTests ]]] newProcess.<br></div><div>...</div><div>And it should do:</div><div>...</div><div>   self changed: #runTests; changed: #isRunning; changed: #isNotRunning. ]]] newProcess.<br></div><div>....</div><div>as runSuite:</div><div>(I also extracted those methods to one)</div><div>3) I fixed a bug when running profiled an empty list of tests.</div><div><br></div><div>I'm attaching a .cs for those changes. I hope you agree with them. </div><div><br></div><div>Also, why did you remove the SUnit from the laben/menu? I'd like it to say "SUnit" for historical reasons ... and there could be runners of other types of tests... Do you mind if we go back to "SUnit ..."?</div><div><br></div><div>Cheers!</div><div>Hernan.</div></div><br><div class="gmail_quote"></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 24, 2023 at 1:01 PM Luciano Notarfrancesco via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Here's some changes for your consideration.</div><div>1) Updated the commands to enter unicode characters with \;</div><div>2) Added cmd-A shortcut to deselect all in the change list (analogous to cmd-a for select all);</div><div>3) Sort the messages in the browser message list with binary messages at the top;</div><div>4) Reworked the test runner.</div><div><br></div><div>The biggest change is the last one. I simplified the test runner window, added shortcuts for everything (cmd-a/A for select/deselect all, cmd-r for run, cmd-o for run one, cmd-l for canceling a run, etc), and fixed redrawing/update problems and some other bugs. Now the lists of error and failing tests are updated while the tests are running, and clicking on an item from those lists stops the current run and debugs the item immediately.</div><div>I use the test runner a lot, I run 5k tests on my project every time I change anything and it takes some minutes. I think these changes make the test runner more useful and less painful, let me know what you think.<br></div></div>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif"><span style="font-weight:bold;font-family:tahoma,sans-serif">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Phone: +54-011</span></font></span></span></strong></span><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2" face="tahoma, sans-serif">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">site: <a href="http://www.10pines.com/" style="font-family:tahoma,sans-serif;color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" face="tahoma, sans-serif"><span style="border-collapse:collapse;font-family:tahoma,sans-serif">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>
</blockquote></div></div>
</blockquote></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif"><span style="font-weight:bold;font-family:tahoma,sans-serif">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Phone: +54-011</span></font></span></span></strong></span><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2" face="tahoma, sans-serif">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">site: <a href="http://www.10pines.com/" style="font-family:tahoma,sans-serif;color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" face="tahoma, sans-serif"><span style="border-collapse:collapse;font-family:tahoma,sans-serif">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>
</blockquote></div></div>
</blockquote></div></div><span>-- </span><br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif"><span style="font-weight:bold;font-family:tahoma,sans-serif">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Phone: +54-011</span></font></span></span></strong></span><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2" face="tahoma, sans-serif">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong style="font-family:tahoma,sans-serif"><span style="font-size:8pt;font-family:tahoma,sans-serif"><span style="font-size:small;font-family:tahoma,sans-serif"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" size="2"><span style="font-weight:normal;font-family:tahoma,sans-serif">site: <a href="http://www.10pines.com/" style="font-family:tahoma,sans-serif;color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font style="font-family:tahoma,sans-serif;color:rgb(0,0,0)" face="tahoma, sans-serif"><span style="border-collapse:collapse;font-family:tahoma,sans-serif">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>
</blockquote></div></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="font-size:small"><div dir="ltr"><div dir="ltr"><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal"><span style="font-weight:bold">Hernán Wilkinson</span><br>Agile Software Development, Teaching & Coaching</span></font></span></span></strong></span></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Phone: +54-011</span></font></span></span></strong></span><font face="tahoma, sans-serif" size="2">-4893-2057</font></div><div style="font-size:12.8px"><strong style="font-family:tahoma,sans-serif;font-size:xx-small"><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">Twitter: @HernanWilkinson</span></font></span></span></strong></div><div style="font-size:12.8px"><span style="font-family:tahoma,sans-serif;font-size:xx-small;border-collapse:collapse"><strong><span style="font-size:8pt"><span style="font-size:small"><font size="2"><span style="font-weight:normal">site: <a href="http://www.10pines.com/" style="color:rgb(17,65,112)" target="_blank">http://www.10Pines.com</a></span></font></span></span></strong></span></div><div style="font-size:12.8px"><font face="tahoma, sans-serif"><span style="border-collapse:collapse">Address: Alem 896</span></font>, Floor 6, Buenos Aires, Argentina</div></div></div></div></div></div></div></div>