1
OpenERP Scenario in Python.
2
###########################
4
Integration of OpenERP scenario with Python, behave and the Anybox buildout recipe:
5
`http://pypi.python.org/pypi/anybox.recipe.openerp/1.3.0 <http://pypi.python.org/pypi/anybox.recipe.openerp/1.3.0>`_
9
Refer to Anybox recipe documentation to create your instance.
10
Then you can add the following lines to you buildout configuration file
11
to use Python scenarios::
14
recipe = zc.recipe.egg
16
extra-paths = ${buildout:directory}/parts/server
51
Checkout the branch of Python scenario.
52
Then move to the root of your instance where the bin should be available::
56
should be available. To run some scenario launch the following command::
58
bin/behave -k --tags=mytag ../path_to_python_scenario/features/ path_to_my_custom_scenario/features
60
The -k option will only show executed scenarios --tags will launch
61
specific scenario. For more information please refer to behave
62
documentation: `http://packages.python.org/behave/
63
<http://packages.python.org/behave/>`_
65
If you want to use **pdb** you have to set --no-capture option when launching behave
67
Anatomy of a custom scenario folder
68
###################################
70
If you want to create you own custom scenario for you project you
71
should use the following guide lines. The folder should be organized
76
│ ├── account_chart.csv
80
│ ├── 01_installation.feature
81
│ └── 02_installation_after_import.feature
87
* data: contains non code related data for your scenarios.
88
* features: mandatory folder contains all features.
89
* setup: contains features required to setup all required data to run your tests
90
* addons: contains addons specific test, small independents scenarios
91
* stories: contains user/workflow tests that are related together
92
* upgrade: scenario to update an instance
93
* steps: contains Python code implementing the gherkin phrases