Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
7241 มุมมอง

Hi there!


I am quite new to odoo and want to setup continous integration for odoo. Therefore I'd like to run all my unittests.


I managed to put together this command:

odoo -d odoo_test -i test,ronny,tools --test-enable


Now I have to problems:

1) The odoo executable never stops when the tests are done. So my pipeline does not know it succeeded and times out at a certain point.

2) When I run all the tests, I see that one test fails, throws and Exception, still the tool is continuing happily and not mentioning it at all. Whats the use of running tests when it's ok when they fail?


Thanks for your help!

Ronny

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

Update:

1) I found the command:

 --stop-after-init

which seems to work but exists with code 1, meaning, it will be interpreted as an error. Any ideas about that?


Thx

Ronny

อวตาร
ละทิ้ง

Many thanks! This is just what I needed. It doesn't exit with code 1 here though; it exists with a nice and clean zero when tests succeed 👍

คำตอบที่ดีที่สุด

I had this same problem. Additionally I wanted an interactive way of running my test quite continuously during development...

I created an open source script to solve both use-cases:

https://github.com/dimitrydhondt/odoutils

Feedback welcome :)

To run it inside of docker you'll need 'docker in docker', I believe.

https://shisho.dev/blog/posts/docker-in-docker/

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Create Mutlipile Pipelines แก้ไขแล้ว
2
มี.ค. 25
2446
1
เม.ย. 24
3194
0
ต.ค. 23
1241
0
ต.ค. 23
2042
2
ก.ย. 23
7106