A library to do tests with our OpenERP Server (v5)
Note
The API is not stable, and can be changed.
Code as if the next guy to maintain your code is a homicidal maniac who knows where you live.
—Kathy Sierra and Bert Bates
PowERP testing framework
Home Page: http://destral.readthedocs.org/
License: GNU General Public License v3.0
When using --no-drodb
the user admin
is initialized without password.
Raise error if no permissions are defined
When tests of different modules are passed, the db is reused for each one, sometimes it can lead to problems in the tests because another module has extended or modified the scheme of some tables
Please could you take a look at https://drone.gisce.net/gisce/erp/5020
Especially to:
2017-07-03 09:15:29,584:INFO:destral.utils.compare_pofiles:Could not get po/pot file: /drone/src/github.com/gisce/erp/server/bin/addons/giscedata_perfils/i18n/[.po
AssertionError: There are -1 missing strings in the PO file of the module giscedata_perfils
But maybe is a testing suite configuration problem.
After #73 we need to show which are the missing strings
Execute destral with multiprocess on 1 process:
PROS:
With an environment variable DESTRAL_FORCE_DATABASE
then use this database and not deleting it when the test is finished.
I am not sure if this is possible, but each time a test run starts it installs the module and all their dependencies, when may be it is not required when the database already exists. This is takes a lot of time and makes unit testing tedious.
I tried commenting line 51 (self.openerp.install_module(self.config['module'])) and the speed improvement is huge!
I propose two possible solutions that:
Mamba, the test runner, is discontinued (no compatibilitat with python >= 3.8)
nestorsalceda/mamba#143
So we have to considerate unittest, pytest...
To ensure https://github.com/gisce/erp/pull/3484
When testing the module "base_extended", the .pot file generated in the test contains strings from module "base" and it should only contain strings from "base_extended"; like the .pot file generated from the ERP (Administration->Translations->Import/Export...).
Same with giscedata_ot_facturacio and giscedata_ot
Circle CI supports tests metadata which inform the failed tests, slower tests, etc.
This metada uses Junit XML format
We have two options:
You can see at https://github.com/gisce/erp/pull/4841
If we have demo data check all the reports defined in the module with that demo data
When module haven't got tests, dropdb after test_all_views fails
For now if we want to patch the creation of new cursors inside a test we have to do:
with Transaction().start(self.database) as txn:
with PatchNewCursors():
...
Maybe we can add the possibillity in creation a new Transaction to define to use PatchedCursors
as
with Transaction(same_cursor=True).start(self.database) as txn:
...
Find if spec
directory is found and then run mamba suite
Force the translation of all the strings from a module
Integration with https://github.com/PyCQA/pycodestyle
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.