Administrator
|
You can now have Phexample playing nicely with OB and Autotest...
* Autotest - I uploaded a new package (Autotest-Core-SeanDeNigris.5) that will pick up Phexample and any other framework that defines tests differently (it uses the class's #allTestSelectors method). * OB - I uploaded a slice to the Pharo inbox that does the same for OB (SLICE-Issue-4449-Feature-OB-can-handle-arbitrarily-defined-test-selectors-SeanDeNigris.1). All it took was removing some duplication in the system - TestCase, Autotest, and OB were all repeating the "what is a test method" logic. HTH, Sean
Cheers,
Sean |
Administrator
|
All 952 Autotest, SUnit, OB, and Phexample tests pass.
Cheers,
Sean |
Too fast :) I've added some tests in Autotest-Tests-Core-LaurentLaffont.3 for Autotest-Core-LaurentLaffont.4 and one does not pass
AutotestTestFinder>>testMethodsForMethodThatStartWithShouldReturnsIt
| lookupMethod foundMethods thisMethod | lookupMethod := (self class>>#shouldBeFound).
foundMethods := (finder methodsFor: lookupMethod). self assert: (foundMethods includes: lookupMethod).
I suppose you have patched TestCase class>>allTestSelectors so it can find shouldXXX methods ? Laurent. On Fri, Jun 24, 2011 at 9:02 PM, Sean P. DeNigris <[hidden email]> wrote: All 952 Autotest, SUnit, OB, and Phexample tests pass. |
Administrator
|
Nope, although anyone wanting #shouldXxx methods in TestCase could do that. Phexample overrides #allTestSelectors to return both testXxx and shouldXxx and does the work for us. Using #allTestSelectors leaves the decision up to the library (so if people start wanting testThatItShouldXxx or whatever, it'll still work). The other advantage is that the behavior of OB, Autotest, and other testing tools will stay in sync with the behavior of the underlying SUnit system. I think this behavior is now under the SUnit umbrella and doesn't have to be tested, no? Sean
Cheers,
Sean |
On Fri, Jun 24, 2011 at 9:39 PM, Sean P. DeNigris <[hidden email]> wrote:
OK. I've updated ConfigurationOfAutotest. laurent laffont wrote: Agree. Laurent Sean |
In reply to this post by Sean P. DeNigris
Hi Sean!
Phexample doesn't duplicate the logic of what is a change method, it changes it. The rational is to allow the user to choose a speaking test name, that accurately describes the test: shouldNicelyHandleNotifications And the like. Is this really in conflict with OB? Niko On 24.06.2011, at 21:01, Sean P. DeNigris wrote: > You can now have Phexample playing nicely with OB and Autotest... > * Autotest - I uploaded a new package (Autotest-Core-SeanDeNigris.5) that > will pick up Phexample and any other framework that defines tests > differently (it uses the class's #allTestSelectors method). > * OB - I uploaded a slice to the Pharo inbox that does the same for OB > (SLICE-Issue-4449-Feature-OB-can-handle-arbitrarily-defined-test-selectors-SeanDeNigris.1). > > All it took was removing some duplication in the system - TestCase, > Autotest, and OB were all repeating the "what is a test method" logic. > > HTH, > Sean > > -- > View this message in context: http://forum.world.st/Phexample-integrated-with-Autotest-and-OB-was-ConfigurationOfPhexample-was-assert-equals-feels-backw-tp3623325p3623325.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > -- http://scg.unibe.ch/staff/Schwarz twitter.com/nes1983 Tel: +41786126354 |
Administrator
|
Yes, quite nicely in fact! The issue was that the "testXxx" was hardcoded in OB and Autotest, so Phexample tests were not picked up by Autotest, and couldn't be run through OB (because "shouldXxx" was not recognized as test methods). The patch was to OB and Autotest, integrating Phexample into the tools. Sean
Cheers,
Sean |
Free forum by Nabble | Edit this page |