No registered users in community xowiki
in last 10 minutes
in last 10 minutes
Re: [Xotcl] test driven development
From: Stefan Sobernig <stefan.sobernig_at_wu.ac.at>
Date: Tue, 26 Apr 2011 12:40:14 +0200
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
>
Date: Tue, 26 Apr 2011 12:40:14 +0200
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
>
-- Institute for Information Systems and New Media Vienna University of Economics and Business Augasse 2-6, A-1090 Vienna `- http://nm.wu.ac.at/en/sobernig `- stefan.sobernig_at_wu.ac.at `- ss_at_thinkersfoot.net `- +43-1-31336-4878 [phone] `- +43-1-31336-746 [fax]