aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'resources/libraries')
-rw-r--r--resources/libraries/python/Constants.py2
-rw-r--r--resources/libraries/python/model/ExportJson.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py
index 4cf6681324..01e3a0154a 100644
--- a/resources/libraries/python/Constants.py
+++ b/resources/libraries/python/Constants.py
@@ -120,7 +120,7 @@ class Constants:
"""Constants used in CSIT."""
# Version for CSIT data model. See docs/model/.
- MODEL_VERSION = u"1.3.0"
+ MODEL_VERSION = u"1.4.0"
# Global off-switch in case JSON export is large or slow.
EXPORT_JSON = get_optimistic_bool_from_env(u"EXPORT_JSON")
diff --git a/resources/libraries/python/model/ExportJson.py b/resources/libraries/python/model/ExportJson.py
index bd457c00f6..478b3abb60 100644
--- a/resources/libraries/python/model/ExportJson.py
+++ b/resources/libraries/python/model/ExportJson.py
@@ -23,9 +23,11 @@ as serialization might have introduced subtle errors.
import datetime
import os.path
+from binascii import b2a_base64
from dateutil.parser import parse
from robot.api import logger
from robot.libraries.BuiltIn import BuiltIn
+from zlib import compress
from resources.libraries.python.Constants import Constants
from resources.libraries.python.jumpavg.AvgStdevStats import AvgStdevStats
@@ -357,6 +359,11 @@ class ExportJson():
Results are used to avoid future post processing, making it more
efficient to consume.
"""
+ if self.data["telemetry"]:
+ telemetry_encode = "\n".join(self.data["telemetry"]).encode()
+ telemetry_compress = compress(telemetry_encode, level=9)
+ telemetry_base64 = b2a_base64(telemetry_compress, newline=False)
+ self.data["telemetry"] = [telemetry_base64.decode()]
if u"result" not in self.data:
return
result_node = self.data[u"result"]