Skip to content
Lampman Tech edited this page Apr 20, 2016 · 10 revisions

behaving.trytond

http://github.com/lampmantech/behaving.trytond

This package provides scenario testing for trytond using behave and behaving BDD (Behaviour Driven Development), and for loading trytond database data and code using BDD. The module is a work-in-progress.

Behaviour Driven Development allows us to refactor the scenarios in Tryton's doctests, to provide easy-to-use templates for end-users to carry out the major tasks of Tryton. By migrating doctest scenarios to behave scenari, the testing moves from the developer into the hands of the end-user. At the same time, duplication of code is eliminated.

Tests are contained is textual feature files written in a domain specific natural language with a Gherkin syntax, in the files: tests/features/*/*.feature

The steps of the domain language draw on the Python definitions in: src/behaving/trytond/steps/*.py. These steps then are activated in the *.feature file by the Python import statements in tests/features/steps/__init__.py

For modularity, there is a local python module of undecorated Python code: src/behaving/trytond/steps/support/

behaving.trytond is inspired by OpenERPScenario: https:///github.com/camptocamp/oerpscenario/ (formerly at http:///launchpad.net/~camptocamp/oerpscenario/) which uses behave: http://pythonhosted.org/behave for BDD testing of OpenERP (v6.x and 7.0). behaving.trytond uses for JSON-RPC to the trytond.

It has been structured to use the behaving namespace from https://github.com/ggozad/behaving/ and requires that package as a prerequisite. This allows us to draw from other behaving namespace packages, to use behaving.web for example to test sao.

Active development is on Tryton 3.6; see

Documentation

We've written a simple script that can harvest the docstrings to the steps for the wiki so that the documentation can be automatically generated; see the Features or Scripts pages, or the TitleIndex .

Project

Use the Wiki to start topics for discussion; it's better to use the wiki for knowledge capture, and then we can pull pages back into the release documentation in the wiki directory. You may need to be signed into github.com to edit in the wiki.

Please format wiki pages as Creole. http://wikicreole.org/

Please file any bugs in the issues tracker.


Clone this wiki locally