Generating videos/screenshots for failed test cases
Odoo uses Headless Chrome. This opens new possibilities. Starting from Odoo 12, you can record videos of the failed test cases, or you can take screenshots of the failed test cases as well.
How to do it...
Recording a video for the test case requires an ffmpeg
package.
- To install this, you need to execute the following command in the terminal (note that this command only works on a Debian-based OS):
apt-get install ffmpeg
- To generate a video or screenshot, you will need to provide a directory location to store the video or screenshots.
- If you want to generate screencast (video) of a test case, use the
--screencasts
command like this:./odoo-bin -c server.conf -i my_library --test-enable --screencasts=/home/pga/odoo_test/
- If you want to generate screenshots of a test case, use the
--screenshosts
command like this:./odoo-bin -c server.conf -i my_library --test-enable --screenshots=/home/pga/odoo_test/