diff --git a/NEWS.rst b/NEWS.rst
index 72b01d6caa010a0c2e61e31a8e02a70cb4666956_TkVXUy5yc3Q=..91e5e5e43bcb1d47a430a1184e8f36f7c13c3097_TkVXUy5yc3Q= 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -11,6 +11,8 @@
 
 Change failure and error detection in ``run_tests``.
 
+run_tests: Add metrics when running in CI.
+
 3.2
 ---
 
diff --git a/run_tests b/run_tests
index 72b01d6caa010a0c2e61e31a8e02a70cb4666956_cnVuX3Rlc3Rz..91e5e5e43bcb1d47a430a1184e8f36f7c13c3097_cnVuX3Rlc3Rz 100755
--- a/run_tests
+++ b/run_tests
@@ -61,6 +61,11 @@
 then
     tests_errors=0
 fi
+# create a metrics file
+if [ -n "$CI" ];
+then
+    echo "odoo_scripts_tests_ran $tests_ran\nodoo_scripts_tests_failures $tests_failures\nodoo_scripts_tests_error $tests_error" > metrics
+fi
 if [ $ODOO_TYPE != 'odoo13' ];
 then
     ok=$(grep ' OK' $logfile -c)