How to do it...

You will need to install a Chrome browser to enable a JavaScript test case. For the development of the modules, we mostly use the desktop OS. Consequently, if you have a Chrome browser installed in your system, then there is no need to install it separately. You can run client-side test cases with desktop Chrome itself. Make sure that you have a Chrome version higher than Chrome 59. Odoo also supports the Chromium browser.

Note that with Headless Chrome, client-side test cases work fine with macOS and Linux, but Odoo does not support Headless Chrome test cases on the Windows system.

Things change slightly when you want to run test cases in the production server or in Server OS. Server OS does not have GUI, so you need to install a Chrome browser differently. If you are using a Debian-based server OS, you can install a Chromium browser with the following command:

apt-get install chromium-browser
Ubuntu 18.04 Server Edition has not enabled the universe repository by default. So it's possible that installing the chromium-browser will show an installation candidate error. To fix this error, enable the universe repository with the following command: sudo add-apt-repository universe.

Odoo also uses WebSockets for JavaScript test cases. For that, Odoo uses the websocket-client Python library. To install it, use the following command:

pip3 install websocket-client
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset