[TIP] PyBehave ?!?

Titus Brown titus at caltech.edu
Thu Mar 15 12:02:10 PDT 2007

On Thu, Mar 15, 2007 at 05:55:09PM +0100, Micha? Kwiatkowski wrote:
-> On 3/15/07, Kumar McMillan <kumar.mcmillan at gmail.com> wrote:
-> > Given a user of the financial group
-> > When logged in
-> > Ensure user can view invoices
-> >
-> > then you could write a test like so:
-> >
-> > import unittest
-> > class TestUserOfTheFinancialGroup(unittest.TestCase):
-> >     def test_when_logged_in_user_can_view_invoices(self):
-> >         pass
-> >
-> > and get from nosetests:
-> >
-> > $ nosetests --with-spec
-> >
-> > User of the financial group
-> > - when logged in user can view invoices
-> Just another idea. Raphael mentioned tests syntax for common use for
-> developers and end-users. Neat thing would be making a script which
-> given the specification on input would generate tests template to fill
-> in by developer with code. Kumar's example above is a good
-> presentation of this - simply reverse the order of spec and code. ;)
-> With this in place end-users could be not merely consumers of
-> specifications but contributors as well. It's questionable if the spec
-> itself is not too vague - developer given a spec would probably need
-> additional information to prepare a good test case. In a way or
-> another I think this is idea worth thinking about.

Hi, Michal,

I think this idea is interesting.

However, my experiences with Actual Users suggests that expecting them
to generate a useful specification is extremely optimistic.  The FIT and
FitNesse people generally structure efforts around generating the
structure of the specifications first, and then allowing the users to
fill in additional data and test cases.


More information about the testing-in-python mailing list