Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
6263 Vistas

Hi there, I have some problems running tests with Odoo 14.


When I ran tests with the --stop-after-init option, it doesn't run any tests at all.


Can somebody help me?


Avatar
Descartar
Autor

Thanks for your response @Devendra Kavthekar

But I already use --test-enable in combination with --stop-after-init . Odoo only stop after init but does not run tests

Mejor respuesta

Make sure you already import the test folder inside __init__.py in your custom addon folder

`Make sure you already import the python inside __init__.py in your test inside your custom addon folder`

Then run the odoo with 

odoo --config=config.conf --database=db --test-enable --update=your_module

No need --stop-after-init (idk what it does anyway)

Tested with odoo 14. Testing with the python code

To make sure the test is running properly, use _logger.info to print any printable data. You'll see recognizable data

Avatar
Descartar
Mejor respuesta

I do have this problem as well, with Odoo 16. Very annoying

Avatar
Descartar
Mejor respuesta

Running tests
Tests are automatically run when installing or updating modules if --test-enable was enabled when starting the Odoo server.

https://www.odoo.com/documentation/15.0/developer/reference/addons/testing.html

Avatar
Descartar
Autor Mejor respuesta

Does anyone has this problem?

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ene 24
980
0
feb 20
4
0
mar 15
3007
3
sept 24
1466
0
may 23
1609