SUnit coverage information?

Chris Muller chris at funkyobjects.org
Wed Apr 5 17:48:01 UTC 2006


Nice work Diego, but based on what Lukas said about the troubles with
exceptions in running under simulation, do you still have your original
implementation via Method Wrappers?

Also, is there any way to specify multiple packages, something like:

watcher := MethodExecutionWatcher
forAllMethodsOfPackagesNamed: #('myPackage1' 'myPackage2')
duringExecutionOf:
[
    MethodExecutionReportTest suite run
].

?

Thanks..


--- Diego Fernandez <diegof79 at gmail.com> wrote:

> I just uploaded to SqueakMap some tools for code coverage, the
> package is
> named with the original name of....  "CodeCoverage" :)
> An usage example:
> 
> | watcher report |
> 
> watcher := MethodExecutionWatcher
> forAllMethodsOfPackageNamed: 'CodeCoverage-Model' duringExecutionOf:
> [
>     MethodExecutionReportTest suite run
> ].
> 
> report := watcher value.
> 
> (MethodExecutionReportWriter on: Transcript) write: report
> 
> The unit test MethodExecutionWatcherTest contains more examples.
> It simply uses the block simulation,  and  creates  a  report of the
> executed methods.
> 
> Andreas, note that this version is a little slow :(
> I think is because I'm using MethodReference and a Set (so each time
> that a
> "step" is evaluated an instance of MethodReference is created is
> checked for
> inclusion against the set). In a previous version I was using
> directly a
> compiled method, and a IdentitySet, it was fast but I don't like the
> idea of
> holding instances of compiled methods (well the next version will be
> faster).
> 
> Ralph, my first attempt was using MethodWrappers. Then Steph told me
> that
> Squeak 3.9 can simulate the execution, so I changed the
> implementation. (I
> think that the later was a lot easier).
> I known that MW is portable, but maybe if your students are creating
> an UI
> for Squeak they can take a look to the uploaded package.
> 
> Cheers,
> Diego,-
> 
> 
> On 4/4/06, Ralph Johnson <johnson at cs.uiuc.edu> wrote:
> >
> > There is a code coverage tool for VisualWorks that is based on
> method
> > wrappers.  A couple of students in my OOP&D class this semester are
> trying
> > to make a version for Squeak.  There might be one in a month or so.
> >
> > -Ralph Johnson
> >
> >
> >
> >
> >
> > 
> 




More information about the Squeak-dev mailing list