SUnit coverage information?

Diego Fernandez diegof79 at gmail.com
Wed Apr 5 06:30:54 UTC 2006


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
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060405/a497249f/attachment.htm


More information about the Squeak-dev mailing list