RE: [Zope-dev] Unit testing, ZUnit - It is in the fishbowl, please comment
The proposal below is in the fishbowl, at http://dev.zope.org/Wikis/DevSite/Proposals/UnitTestingProducts The approach will be, developing the standalone ZUnit Product while the proposal is in the fishbowl, then push for the proposal (integrating it with App/Product*.py). Expect a first release of ZUnit next week or in the other. In the meanwhile, please comment in the proposal's discussion page :-) (or here) I added some comments on this to: http://dev.zope.org/Wikis/DevSite/Proposals/UnitTestingProductsDiscussion Brian Lloyd[EMAIL PROTECTED] Software Engineer 540.371.6909 Digital Creations http://www.digicool.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit - It is in the fishbowl, please comment
The proposal below is in the fishbowl, at http://dev.zope.org/Wikis/DevSite/Proposals/UnitTestingProducts The approach will be, developing the standalone ZUnit Product while the proposal is in the fishbowl, then push for the proposal (integrating it with App/Product*.py). Expect a first release of ZUnit next week or in the other. In the meanwhile, please comment in the proposal's discussion page :-) (or here) On Mon, Oct 23, 2000 at 10:56:31PM -0200, Lalo Martins wrote: We (I and Hiperlógica) started to develop a Product we called ZUnit, intended for XP-style unit-testing Python-based Products in a full Zope environment (with a real ZODB, REQUEST, RESPONSE, etc). We first conceived it as a kind of Zope-based version of unittestgui.py - you create a "TestRunner" object giving it the package, module and name of a TestSuite object generator (see the PyUnit documentation) and inside it you may click on some widget to run the tests and produce a "TestResult" object which you can inspect later. Does this sound like a good design? Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? For our XP endeavors, we've developed a testing framework we call SimpleTest, which tests our systems using HTTP requests. Tests are written in XML, along the lines of: ?xml version="1.0" ? !DOCTYPE testrun SYSTEM "../multiple_test.dtd" testrun description="Tests for read-only form" test descriptionThis is a very simple tests/description target_urlhttp://my.server.name/somewhere/target_url input field name="field1"magicroundabout/field field name="field2"1/field /input output ... various condition blocks to test if the returned HTML contains or doesn't contain stuff, or the return code was xxx /output /test test ... you can have lots of tests in a test run /test /testrun You can set authentication for a test run, and (crudely) pass variables from one test to another. Tests are stored as XML files and we use CVS to control them. Our feeling is we will probably need to use PyUnit at some point, but for the moment this is serving our needs OK. Using this we have been able to unit test most of the bits of the Zope applications we write, including where those applications link into other web-accessible systems. The framework is written in Python and we've been adding bits to it as needed. Simon -- - My opinions are my own, NIP's opinions are theirs -- Simon J. Coles Email: [EMAIL PROTECTED] New Information Paradigms Work Phone: +44 1344 753703 http://www.nipltd.com/ Work Fax: +44 1344 753742 === Life is too precious to take seriously === ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
Lalo Martins [EMAIL PROTECTED] writes: Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. I like the idea a lot, but would like to suggest that unit tests ala PyUnit really have three parts that call for separate treatment. 1. Test environment setup: construct the data structure(s) a test needs to run against. This wants to be separate because different tests can frequently share the same data structures and data structure setup can be non-trivial in systems like Zope. Since Zope is a persistent object space, there would also need to be code to tear down a test environment. Let's just lump that in here since it will be automagically invoked by the unit test facility. 2. Test definition and execution: pretty obvious :-) 3. Test results reporting: a small number (1?) of standard reporters plus the ability to define and register new reporters. Given the above, the task of writing most tests would consist of: 1. Select test environment. 2. Select default reporter. Optionally list which other reporters can be selected at test execution time? 3. Write and test the test. 4. Register the test so that it appears on the Test page. Dan Pierson ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] Unit testing, ZUnit
We (I and Hiperlógica) started to develop a Product we called ZUnit, intended for XP-style unit-testing Python-based Products in a full Zope environment (with a real ZODB, REQUEST, RESPONSE, etc). We first conceived it as a kind of Zope-based version of unittestgui.py - you create a "TestRunner" object giving it the package, module and name of a TestSuite object generator (see the PyUnit documentation) and inside it you may click on some widget to run the tests and produce a "TestResult" object which you can inspect later. Does this sound like a good design? Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? (I will create a proposal in dev.zope.org, but I want to get some feedback here first to flesh out the proposal a little more.) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
I would be very interested in such a beast. It's way too hard to do unit testing in Zope right now. I'm not sure about how it should be designed, but that's what the fishbowl is for. :-) - Original Message - From: "Lalo Martins" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 23, 2000 8:56 PM Subject: [Zope-dev] Unit testing, ZUnit We (I and Hiperlógica) started to develop a Product we called ZUnit, intended for XP-style unit-testing Python-based Products in a full Zope environment (with a real ZODB, REQUEST, RESPONSE, etc). We first conceived it as a kind of Zope-based version of unittestgui.py - you create a "TestRunner" object giving it the package, module and name of a TestSuite object generator (see the PyUnit documentation) and inside it you may click on some widget to run the tests and produce a "TestResult" object which you can inspect later. Does this sound like a good design? Then I figured in the long run a Product isn't the best sollution; instead, fiddling with App/Product* sounds more like it, to allow developers to register tests just like they register classes, ZClass superclasses, _misc and help. Of course, just like the current registerHelp and others, it wouldn't be mandatory and not using it wouldn't break anything. Then, in the Product's page in the Control Panel, there would be a tab "Test", where you'd be allowed to run the unit tests. What do people think of this? What does DC think of this? Can I go ahead and develop it in this direction? (I will create a proposal in dev.zope.org, but I want to get some feedback here first to flesh out the proposal a little more.) []s, |alo + -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:[EMAIL PROTECTED] pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG)--- http://zope.gf.com.br/BroDar ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Unit testing, ZUnit
What do people think of this? you get my vote kapil ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )