Generating videos/screenshots for failed test cases
Odoo uses Headless Chrome, which opens new possibilities. Starting from Odoo 12, you can record videos of the failed test cases, and you can take screenshots of them as well.
How to do it...
Recording a video for a 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 a screencast (video) of a test case, use the
--screencasts
command, like this:./odoo-bin -c server.conf -i my_hostel --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_hostel --test-enable --screenshots=/home/pga/odoo_test/