From c6ed80e1b6efcaf252a6eeabae77690e7e05e3e3 Mon Sep 17 00:00:00 2001 From: Christophe Monniez Date: Tue, 4 Sep 2018 16:56:49 +0200 Subject: [PATCH] [FIX] tests: disable screencast when no logfile When an HttpCase browser_js test is started, the screencast is started and is discarded at the end of the test if no logfile was provided by the config. This behavior can impact the performances. With this commit, the screencast does not start at all if not needed. --- odoo/tests/common.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 25c2e8b20e2..9adc6dfb8b8 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -842,8 +842,9 @@ class HttpCase(TransactionCase): url = "http://%s:%s%s" % (HOST, PORT, url_path or '/') self._logger.info('Open "%s" in browser', url) - self._logger.info('Starting screen cast') - self.browser.start_screencast() + if odoo.tools.config['logfile']: + self._logger.info('Starting screen cast') + self.browser.start_screencast() self.browser.navigate_to(url) # Needed because tests like test01.js (qunit tests) are passing a ready