For Programmers: Free Programming Magazines  


Home > Archive > Tcl > July 2004 > ANNOUNCE: Tcl Stubs Package









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ANNOUNCE: Tcl Stubs Package
Robert Seeger

2004-07-21, 3:58 pm

I am proud to officially announce the first release of the Tcl Stubs
Package.

What is the Tcl Stubs Package?

The Stubs package is a library for enhancing the development speed and
readability of test cases (typically, for tcltest). It allows one to
temporarily redefine a command, group of commands, or part of a
command (ie, a subcommand). The actual README file is shown below,
which goes into more detail about the package.

The individuals at Sourceforge have been kind enough to host the
project, meaning it can be found at
http://sourceforge.net/projects/tclstubs/

The README
----------
Description:

Stubs is a package for the Tcl programming language, intended to make
writing
tests faster and easier. By simplifying the process of temporarily
replacing the
functionality of a command, group of commands, or part of a command,
test cases
are simpler to both write and understand.

The package provides the following functionality:
- Stub out a command in several ways:
- Replace a command with one that returns a simple value
- Replace a command with an alias to another command
- Replace a command with a new command definition
- Replace a command with another, predefined, command
- Replace a subcommand of a command with a new code block (i.e.,
clock seconds)
- Unstub a command, returning it to its original functionality
- Call the previous definition of a command from within a stub
- Define command replacements, which can later be used in the stub
process
- Define stub Groups with can be used to stub multiple commands at
once
- Load stub modules, which can define various groups and/or stubs

Note:

The Stubs package was originally written for use with the standard Tcl
package
tcltest. While there is no reason it should not work with other
testing
frameworks, it has not been tested outside of tcltest.

Acknowledgments:

The Stubs package was originally designed and written at AOL, in
support of unit
testing for various software projects there. While the code in this
package was
developed separately from that use at AOL, the base ideas and
functionalities
are the same. As such, I extend my thanks to AOL for the ideas
contained in this
package, and for allowing me to take those ideas and publicly release
my own
implementation of them.

I would also like to thank Dossy Shiobara, who was a co-developer of
the
original package and was kind enough to provide many helpful ideas
about the
functionality.
Donald Arseneau

2004-07-22, 3:57 am

rseeger00@aol.com (Robert Seeger) writes:

> I am proud to officially announce the first release of the Tcl Stubs
> Package.


Isn't the name "Tcl Stubs" already in use? That will cause
confusion when speaking of "stubs-enabled".


Donald Arseneau asnd@triumf.ca
Gerald W. Lester

2004-07-22, 3:57 am

Donald Arseneau wrote:
> rseeger00@aol.com (Robert Seeger) writes:
>
>
>
>
> Isn't the name "Tcl Stubs" already in use? That will cause
> confusion when speaking of "stubs-enabled".


Yes and yes

Robert should really chose another name since "stubs" is a part of the
"core" tcl concepts.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester | "The man who fights for his ideals is |
| Gerald.Lester@cox.net | the man who is alive." -- Cervantes |
+--------------------------------+---------------------------------------+
Robert Seeger

2004-07-22, 3:58 pm

Unfortunately, the name of the package was decided upon back during
its initial development, when it was just a single proc rather than an
entire package. When I rewrote it for public release, I thought it was
too late to change the name. Having had time to reconsider the issue,
I realize I should probably have changed it to something less
conflicting.

On that note, does anyone have any good ideas for a new name for
it. The reason stubs was chosen is that the functionality of the
package is based around temporarily replacing the definition of a
command (or subcommand, or group of commands). The name for the
command to perform this action was chosen to be "stub", since thats
what it was doing when originally developed (replacing the
functionality of a, currently undefined, command with a stub... so
that the code we were actualy testing would not throw an error when it
called that command).

I'd be very open to considering other names for the package (and, most
likely, the command names) if anyone has any good ideas.

Thanks,
Robert Seeger
Volker Hetzer

2004-07-22, 3:58 pm


"Robert Seeger" <rseeger@booch.rkseeger.net> schrieb im Newsbeitrag news:874qo0m8f6.fsf@booch.rkseeger.net...
> On that note, does anyone have any good ideas for a new name for
> it. The reason stubs was chosen is that the functionality of the
> package is based around temporarily replacing the definition of a
> command (or subcommand, or group of commands).

cuckoo egg?

Greetings!
Volker
Kevin Kenny

2004-07-22, 3:58 pm

Robert Seeger wrote:
> On that note, does anyone have any good ideas for a new name for
> it. The reason stubs was chosen is that the functionality of the
> package is based around temporarily replacing the definition of a
> command (or subcommand, or group of commands). The name for the
> command to perform this action was chosen to be "stub", since thats
> what it was doing when originally developed (replacing the
> functionality of a, currently undefined, command with a stub... so
> that the code we were actualy testing would not throw an error when it
> called that command).


Perhaps, given the current state of the project, 'aspects' might
be a better term. That would connect into the current work
on aspect-oriented programming (there's one fairly gentle
introduction at http://www.linux-mag.com/2004-04/aspects_01.html).
You might then want to follow the "point-cut" and "advice"
terminology as well, but that's your call.

--
73 de ke9tv/2, Kevin
Gerald W. Lester

2004-07-23, 3:57 am

Robert Seeger wrote:
>
>
> Oooh. I like that. Perhaps "Tcl TestStubs Package". That fits both
> parameters of "its right" and "it doesn't conflict, much".


I can live with TestStubs, it feels right and doesn't conflict.

--
+--------------------------------+---------------------------------------+
| Gerald W. Lester | "The man who fights for his ideals is |
| Gerald.Lester@cox.net | the man who is alive." -- Cervantes |
+--------------------------------+---------------------------------------+
Michael Kirkham

2004-07-23, 8:57 am

In article <874qo0m8f6.fsf@booch.rkseeger.net>,
rseeger@booch.rkseeger.net says...

> On that note, does anyone have any good ideas for a new name for
> it.


Stumps. Just make sure it's well documented or people might take that
the wrong way. ;)

--
Michael Kirkham
Muonics
http://www.muonics.com/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com