-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Importing bzr history into Git repository
Conflicts: README.md
- Loading branch information
Showing
88 changed files
with
6,952 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
base.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>Openerp scenario</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>com.aptana.ide.core.unifiedBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>com.aptana.ruby.core.rubynature</nature> | ||
<nature>com.aptana.projects.webnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,39 @@ | ||
oerpscenario | ||
============ | ||
OERPScenario - Business Driven Development (BDD) for OpenERP/Odoo | ||
================================================================= | ||
|
||
Business Driven Development (BDD) for OpenERP/Odoo | ||
OERPScenario is a tool to allows Business Driven Development (BDD). It allows | ||
non-technical people to write real business cases, that will be tested among | ||
OpenERP to ensure no regressions. | ||
|
||
OERPScenario will allow us to detect regressions from one version to another by | ||
running a test suites composed by scenario on a specified OpenERP server | ||
(directly on the customer replication instance, or just on the last stable | ||
release). | ||
|
||
We also include in this brand new version written in Python and based on | ||
Erppeek (http://erppeek.readthedocs.org/en/latest/) a complete DSL that allow | ||
you to write tests at the speed of thought. | ||
|
||
This means a business specialist can write something like the following: | ||
|
||
Scenario: SO013 CREATION | ||
Given I need a "sale.order" with name: SO013 and oid: scenario.anglosaxon_SO013 | ||
And having: | ||
| name | value | | ||
| date_order | %Y-03-15 | | ||
| name | SO013 | | ||
| partner_id | by oid: scenario.customer_1 | | ||
| pricelist_id | by id: 1 | | ||
| partner_invoice_id | by oid: scenario.customer_1_add | | ||
| partner_order_id | by oid: scenario.customer_1_add | | ||
| partner_shipping_id | by oid: scenario.customer_1_add | | ||
| shop_id | by id: 1 | | ||
Given I need a "sale.order.line" with oid: scenario.anglosaxon_SO013_line1 | ||
And having: | ||
| name | value | | ||
| name | SO013_line1 | | ||
| product_id | by oid: scenario.p5 | | ||
| price_unit | 450 | | ||
| product_uom_qty | 1.0 | | ||
| product_uom | by name: PCE | | ||
| order_id | by oid: scenario.anglosaxon_SO013 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
OpenERP Scenario in Python. | ||
########################### | ||
|
||
Integration of OpenERP scenario with Python, Behave and the Anybox buildout recipe: | ||
`http://pypi.python.org/pypi/anybox.recipe.openerp <http://pypi.python.org/pypi/anybox.recipe.openerp>`_ | ||
|
||
Installation: | ||
Refer to Anybox recipe documentation to create your instance. | ||
Then you can add the following lines to your buildout config file:: | ||
|
||
[python] | ||
recipe = zc.recipe.egg | ||
interpreter = python | ||
extra-paths = ${buildout:directory}/parts/server | ||
eggs = behave | ||
ERPpeek | ||
mock | ||
unittest2 | ||
MarkupSafe | ||
Pillow | ||
PyXML | ||
babel | ||
feedparser | ||
gdata | ||
lxml | ||
mako | ||
psycopg2 | ||
pychart | ||
pydot | ||
pyparsing | ||
python-dateutil | ||
python-ldap | ||
python-openid | ||
pytz | ||
pywebdav | ||
pyyaml | ||
reportlab | ||
simplejson | ||
vatnumber | ||
vobject | ||
werkzeug | ||
xlwt | ||
docutils | ||
|
||
Usage | ||
##### | ||
Checkout the branch of Python scenario. | ||
Then move to the root of your instance where the bin folder is located:: | ||
|
||
bin/behave | ||
|
||
should be available. To run some scenario launch the following command:: | ||
|
||
bin/behave -k --tags=mytag ../path_to_python_scenario/features/ path_to_my_custom_scenario/features | ||
|
||
The -k option will only show executed scenario --tags will launch specific scenario. | ||
For more information, please refer to behave documentation: | ||
`http://packages.python.org/behave/ <http://packages.python.org/behave/>`_ | ||
|
||
If you want to use **pdb** you have to set --no-capture option when launching behave | ||
|
||
Anatomy of a custom scenario folder | ||
################################### | ||
|
||
If you want to create your own custom scenario for your project, | ||
you should use the guidelines below. The folder should be organized as follows:: | ||
|
||
OERPScenario/ | ||
├── data | ||
│ ├── account_chart.csv | ||
│ └── logo.png | ||
└── features | ||
├── setup | ||
│ ├── 01_installation.feature | ||
│ └── 02_installation_after_import.feature | ||
├── addons | ||
├── steps | ||
├── stories | ||
└── upgrade | ||
|
||
* data: contains non code related data for your scenarios. | ||
* features: mandatory folder, contains all features. | ||
* setup: contains features required to set up all required data to run your tests. | ||
* addons: contains addons specific tests, small independent scenarios. | ||
* stories: contains user/workflow tests that are related. | ||
* upgrade: scenario to update an instance. | ||
* steps: contains Python code implementing the Gherkin phrases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Version x.x.x | ||
============= | ||
|
||
|
||
This version brings OERPScenario compatibility with behave 1.2.4. | ||
|
||
Things to change in your features and steps: | ||
|
||
1. the tools which are defined in `support/tools.py` are no longer available in | ||
the `globals()` of your step definitions, so you need to import them manually: | ||
|
||
from support.tools import model, puts, set_trace, assert_equal | ||
|
||
There is also a shortcut available: | ||
|
||
from support import * | ||
|
||
|
||
|
||
2. There has been a change in the way the `ctx.feature.filename` attribute is | ||
managed. If your step definitions use this variable, e.g. to get a path to a | ||
`data` directory to load files, you will need to adapt. For the record the | ||
patch applied to the basic step definitions is: | ||
|
||
=== modified file 'features/steps/tools.py' | ||
--- features/steps/tools.py 2014-08-27 13:46:19 +0000 | ||
+++ features/steps/tools.py 2014-08-28 06:41:58 +0000 | ||
@@ -38,9 +38,9 @@ | ||
@given('"{model_name}" is imported from CSV "{csvfile}" using delimiter "{sep}"') | ||
def impl(ctx, model_name, csvfile, sep=","): | ||
tmp_path = ctx.feature.filename.split(os.path.sep) | ||
- tmp_path = tmp_path[1: tmp_path.index('features')] + ['data', csvfile] | ||
+ tmp_path = tmp_path[: tmp_path.index('features')] + ['data', csvfile] | ||
tmp_path = [str(x) for x in tmp_path] | ||
- path = os.path.join('/', *tmp_path) | ||
+ path = os.path.join(*tmp_path) | ||
assert os.path.exists(path) | ||
data = csv.reader(open(path, 'rb'), delimiter=str(sep)) | ||
head = data.next() | ||
|
||
3. If you step definitions used the helper functions from `dsl.py` to parse | ||
domain from table data for instance, you need to import them. They were | ||
extracted to a new module `dsl_helper` to ease things and avoid a mess with | ||
duplicate step definitions: | ||
|
||
from dsl_helpers import (parse_domain, | ||
build_search_domain, | ||
parse_table_values, | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
type;code;id;name;parent_id/id;company_id/id | ||
Analytic View;0;pa_de_0;Plan analytique;;base.main_company | ||
Analytic View;11;pa_de_11;Categorie A;pa_de_0;base.main_company | ||
Analytic Account;111;pa_de_11010;projet AA;pa_de_11;base.main_company | ||
Analytic Account;112;pa_de_11020;projet AB;pa_de_11;base.main_company | ||
Analytic Account;113;pa_de_11030;projet AC;pa_de_11;base.main_company | ||
Analytic View;12;pa_de_12;Categorie B;pa_de_0;base.main_company | ||
Analytic Account;121;pa_de_11010;projet BA;pa_de_11;base.main_company | ||
Analytic Account;122;pa_de_11020;projet BB;pa_de_11;base.main_company | ||
Analytic Account;123;pa_de_11030;projet BC;pa_de_11;base.main_company |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ref,date,period_id,journal_id,Entries / account_id,Entries / partner_id,Entries / name,Entries / date_maturity,Entries / debit,Entries / credit,Entries / amount_currency,Entries / currency_id,Entries / tax_code_id,Entries / tax_amount | ||
TOTO6,2013-01-15,SJAN13,FR-Ventes Sensee,411000,Client 1,ztjdh,2012-04-14,1000,,1500,USD,"TVA collectée 19.6% - TVA 19.6%",1000 | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,, | ||
TOTO7,2013-01-15,SJAN13,FR-Ventes Sensee,411000,Client 1,ztjdh,2012-04-14,6000,,1500,USD,, | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,, | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,, | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,, | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,, | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,"TVA collectée 19.6% - TVA 19.6%",1000 | ||
,,,,707100,Client 1,rwtztezawt,,,1000,-1500,USD,"TVA collectée 19.6% - TVA 19.6%",1000 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
README | ||
====== | ||
====== | ||
|
||
This folder will contain the important data. The idea is to all have the same reference (base datas) to launch our testing suite ! | ||
|
||
Magento | ||
======= | ||
|
||
The oerpscenario_dump_magento_1.5.sql.zip file is the reference dump for launching the test suites among Magento 1.5. | ||
|
||
url: http://localhost:8080 | ||
|
||
admin url: http://localhost:8080/admin | ||
admin login: admin / MagentoERPConnect9 | ||
|
||
API url: http://localhost:8080/index.php/api/xmlrpc | ||
API login: openerp_connect / openerp_connect | ||
|
||
|
||
Prestashop | ||
========== | ||
|
||
The oerpscenario_dump_prestashop_1.4.6.2.sql.zip file is the reference dump for launching the test suites among Prestashop 1.4.6.2 | ||
|
||
url: http://prestashop:8888/ | ||
|
||
admin url: http://prestashop:8888/admin1234/login.php | ||
admin login: joel.grandguillaume@camptocamp.com / toto1234 | ||
|
||
API Key : BVWPFFYBT97WKM959D7AVVD0M4815Y1L | ||
|
||
Nom de la boutique : prestashop | ||
|
Oops, something went wrong.