Headless Chrome is used by Odoo. It creates more opportunities. It is now feasible to capture
screenshots and record unsuccessful test cases starting with Odoo 12.
The ffmpeg package is needed in order to record a video for the test case.
Generating Video/Screenshots
- Command to install ffmpeg package in python
apt-get install ffmpeg
- Use the --screencasts command to create screencasts (films) of your test cases:
/odoo-bin -c
server.conf -i my_module --test-enable
--screencasts=/home/odoo/odoo_test/
- Use the --screenshosts command to capture screenshots of your test cases:
./odoo-bin -c
server.conf -i my_module --test-enable
--screenshots=/home/odoo/odoo_test/
In order to produce screenshots or screencasts of unsuccessful tests, the server must be run with a
directory where you can save recorded images or videos. Odoo records a screen grab or video of the
failed test case to the designated registry each time a test fails.
Odoo needs the ffmpeg package in order to create test case movies. It will only save screenshots of
unsuccessful test cases if this package is not installed on the server. All of the failed test cases
will be visible as mp4 files when the package has been installed.