I have added some unit-test case for the module but right now I would like to test my unit test case code coverage in local.
How can I check How Many Lines are triggered or not?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I have added some unit-test case for the module but right now I would like to test my unit test case code coverage in local.
How can I check How Many Lines are triggered or not?
Hi Nik,
Follow python-code coverage document which could help you to make progress.
Hi,
This Link not working..
Thank you For Quick Response Odoo Lover's
I Find Other Way with Coverage using https://coverage.readthedocs.io/en/v4.5.x/
Server Run: coverage run ./odoo.py -d db_name -u module_name --test-enable --log-level=test
First Run: coverage report -m
Then Created a new file in your Branch like .coverage
Second Run: coverage html
Then Created another new file in your Branch like htmlcov/
Move-in htmlcov Folder and Open index.html with a web browser.
Note: If Run Second time, Removing .coverage & htmlcov/ files, If not removed.
Hi
odoo runbot use coverage lib https://coverage.readthedocs.io/en/v4.5.x/ lib to get coverage report.
start odoo as a script with coverage using python -m command
python -m coverage run [covarge params] odoo-bin [odoo params]
After the test is done or your workflow execute from UI stop the odoo
using command coverage html generate the report
ref: https://github.com/odoo/runbot/blob/98b2ccf72c534a5b2ce83716b9d416a5a6652656/runbot/container.py#L182
http://runbot16.odoo.com/runbot/static/build/629528-master-1709fb/coverage/index.html
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
Unit tests coverage in odoo
Diselesaikan
|
1
Feb 20
|
7381 | ||
|
2
Agu 16
|
6454 | |||
|
2
Okt 25
|
1634 | |||
|
2
Jun 25
|
3002 | |||
|
0
Agu 24
|
3622 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.