View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] test driven development

From: Mark Strembeck <strembeck_at_acm.org>
Date: Tue, 26 Apr 2011 15:09:31 +0200

Hi Victor,

in case you like to give it a try: version 0.5 of the basic STORM test
environment (including a small example written by Stefan) can be
downloaded from the following URL:
http://wi.wu.ac.at/home/mark/STORM/storm-v.0.5.tar.gz
or
http://wi.wu.ac.at/home/mark/STORM/storm%2dv%2e0%2e5%2etar%2egz

best regards,

Mark


On Tuesday 26 April 2011 12:40:14 Stefan Sobernig wrote:
> Victor,
>
> > I am beginning to learn and use test driven development in my
> > projects. I've noticed that NX does not use the standard "tcltest"
> > package in Tcl but instead provides it's own "nx::test". Is there a
> > specific reason for that?
>
> I can't give you the full story, only some observations of mine. To some
> extent, nx::test and especially its predecessors (xotcl::test) are a legacy:
>
> OTcl had its own testing environment, not using or not building upon
> tcltest, and so had XOTcl; see e.g.
> http://otcl-tclcl.cvs.sourceforge.net/viewvc/otcl-tclcl/otcl/lib/test.tcl?view=markup
>
> test migration vs. test continuity so is the issue here. also: nx::test
> & friends have always been used to test core functionality of the
> language system, rather than application testing. for your XOTcl/nx
> application, tcltest is certainly a viable option (coming with nice
> helpers actually missing in nx::test). another answer along these lines
> is probably that a home-brewed testing evironment is usually one of the
> first prototype applications written by the language authors in their
> language.
>
> as for application testing, however, an object-aware testing environment
> comes handy; you can refine your test suites occasionally through
> mixins; or nx::test traces object lifecycles during test execution to
> maintain a prestine testing sandbox to avoid unwanted test interactions.
> however, that does not mean that you could not realise all of this using
> tcltest.
>
> some further pointers, especially when it comes to TDD (which is, by the
> way, something different than merely writing and executing tests in the
> sense of tcltest or nx::test):
>
> Two or three years ago, I had a look at a xUnit framework for XOTcl:
> http://xotcllib.cvs.sourceforge.net/viewvc/xotcllib/xounit/
>
> While it gave me a xUnit environment, it found it incomplete and its
> implementation rather clumsy (including its usage of Exception objects
> ontop of Tcl's error control flow mechanism).
>
> More recently, Mark published on a scenario-driven approach and
> prototype framework (STORM) which I successfully used in one or two dev
> projects of mine. It comes with essentials concepts for applying a
> test-first development approach:
>
> http://wi.wu-wien.ac.at/home/mark/publications/se2011-extended.pdf
>
> I don't know whether the prototype implementation (the XOTcl script) is
> publicly available, but you could most certainly talk Mark into
> providing it to you :)
>
> //stefan
>
>
>
>
>
>
>
>
>
>
> >
> > Thanks,
> >
> > Victor
> > _______________________________________________
> > Xotcl mailing list
> > Xotcl_at_alice.wu-wien.ac.at
> > http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
> >
>
>
>