Repository: test-results-reporter/reporter
Pull request #121 (2023-02-10 09:28:12)

11 support influxdb v1 as target


Patch:
diff --git a/package-lock.json b/package-lock.json
index 8f8dc97..799653e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "test-results-reporter",
-  "version": "1.0.16",
+  "version": "1.0.17",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -1395,9 +1395,9 @@
       "dev": true
     },
     "parse-jtl": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/parse-jtl/-/parse-jtl-1.0.2.tgz",
-      "integrity": "sha512-SVYjidaVm8o76Rj6a6BGg1/nGlBCel3uprF8wPuk0ShmtbAjoNZTT5DLAjRzWb+8hMlaMENC6m//ir9lKStokw==",
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/parse-jtl/-/parse-jtl-1.0.4.tgz",
+      "integrity": "sha512-2wvCDnksOfw2LM+MEx0TvkaXHUAY6zf/jULsYeirbFfF6uiA4uQgIczHppNbT7BRxRSHwmRLtDTw7TZ3UtVZJQ==",
       "requires": {
         "csvjson": "^5.1.0"
       }
@@ -1438,13 +1438,13 @@
       "dev": true
     },
     "performance-results-parser": {
-      "version": "0.0.6",
-      "resolved": "https://registry.npmjs.org/performance-results-parser/-/performance-results-parser-0.0.6.tgz",
-      "integrity": "sha512-nRlnVQjERXompTnG1+iKEybd2Q+Uc5QsRC7ZxzDsrRtBdpqCrf4ZZWKEnNnUdleoU4pLgtEv4K8bnGUy/MB+Tw==",
+      "version": "0.0.7",
+      "resolved": "https://registry.npmjs.org/performance-results-parser/-/performance-results-parser-0.0.7.tgz",
+      "integrity": "sha512-hmI34Q1ibqAbwCEQ2Rr9x36VufuicgMUMcW54OJFOlAfln6WS6h+dHGzeVfdn93D51zVonbY8rVov1IKF0W7iQ==",
       "requires": {
         "csvjson": "^5.1.0",
         "globrex": "^0.1.2",
-        "parse-jtl": "^1.0.2",
+        "parse-jtl": "^1.0.3",
         "totalist": "^3.0.0"
       }
     },
@@ -1899,9 +1899,9 @@
       }
     },
     "test-results-parser": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/test-results-parser/-/test-results-parser-0.1.3.tgz",
-      "integrity": "sha512-ioPqPx9UYuD1mVOmiJJIIr+GJmoUsRO+ijH+tQtGvRGdBi8zGoLhoLaZTcgEL9e2QDB/KokWc2i+cfzkBltD9Q==",
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/test-results-parser/-/test-results-parser-0.1.4.tgz",
+      "integrity": "sha512-qJUMWDpHvZ09d423YW6EMbLLFjHROdkdjWa5WLxvjaOtANcoW+IXplC11vvOJl2aKaOx3HxpSBTBOJXbtA4X3g==",
       "requires": {
         "fast-xml-parser": "^3.20.0",
         "globrex": "^0.1.2",
diff --git a/package.json b/package.json
index 782c81c..c5b0deb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "test-results-reporter",
-  "version": "1.0.16",
+  "version": "1.0.17",
   "description": "Publish test results to Microsoft Teams, Google Chat, Slack and InfluxDB",
   "main": "src/index.js",
   "types": "./src/index.d.ts",
@@ -36,7 +36,8 @@
     "reportportal",
     "google chat",
     "chat",
-    "percy"
+    "percy",
+    "jmeter"
   ],
   "author": "",
   "license": "ISC",
diff --git a/src/targets/chat.js b/src/targets/chat.js
index 754c157..f65bc85 100644
--- a/src/targets/chat.js
+++ b/src/targets/chat.js
@@ -221,7 +221,17 @@ const default_inputs = {
   include_suites: true,
   only_failures: false,
   include_failure_details: false,
-  duration: ''
+  duration: '',
+  metrics: [
+    {
+      "name": "Samples",
+    },
+    {
+      "name": "Duration",
+      "condition": "always",
+      "fields": ["avg", "p95"]
+    }
+  ]
 };
 
 module.exports = {
diff --git a/src/targets/influx.js b/src/targets/influx.js
index 91b13b6..2acabcb 100644
--- a/src/targets/influx.js
+++ b/src/targets/influx.js
@@ -66,7 +66,7 @@ function getPerfRunInfluxMetric({ result, target }) {
   tags.Name = result.name;
   tags.Status = result.status;
 
-  const fields = {};
+  const fields = Object.assign({}, target.inputs.fields);
   fields.status = result.status === 'PASS' ? 0 : 1;
   fields.transactions = result.transactions.length;
   fields.transactions_passed = result.transactions.filter(_transaction => _transaction.status === "PASS").length;
@@ -115,11 +115,6 @@ function getTransactionInfluxMetric(transaction, target) {
   tags.Status = transaction.status;
 
   const fields = Object.assign({}, target.inputs.fields);
-  for (const key in fields) {
-    if (Object.hasOwnProperty.call(fields, key)) {
-      fields[key] = parseInt(fields[key]);
-    }
-  }
   fields.status = transaction.status === 'PASS' ? 0 : 1;
 
   for (const metric of transaction.metrics) {
@@ -145,11 +140,6 @@ function getTestInfluxMetric({ result, target }, measurement) {
   tags.Status = result.status;
 
   const fields = Object.assign({}, target.inputs.fields);
-  for (const key in fields) {
-    if (Object.hasOwnProperty.call(fields, key)) {
-      fields[key] = parseInt(fields[key]);
-    }
-  }
   fields.status = result.status === 'PASS' ? 0 : 1;
   fields.total = result.total;
   fields.passed = result.passed;
@@ -175,11 +165,6 @@ function getTestCaseInfluxMetric({ result, target }) {
   tags.Status = result.status;
 
   const fields = Object.assign({}, target.inputs.fields);
-  for (const key in fields) {
-    if (Object.hasOwnProperty.call(fields, key)) {
-      fields[key] = parseInt(fields[key]);
-    }
-  }
   fields.status = result.status === 'PASS' ? 0 : 1;
   fields.duration = result.duration;
 
diff --git a/src/targets/slack.js b/src/targets/slack.js
index 5ed36bc..a862a3d 100644
--- a/src/targets/slack.js
+++ b/src/targets/slack.js
@@ -244,7 +244,17 @@ const default_inputs = {
   include_suites: true,
   only_failures: false,
   include_failure_details: false,
-  duration: ''
+  duration: '',
+  metrics: [
+    {
+      "name": "Samples",
+    },
+    {
+      "name": "Duration",
+      "condition": "always",
+      "fields": ["avg", "p95"]
+    }
+  ]
 }
 
 module.exports = {
diff --git a/src/targets/teams.js b/src/targets/teams.js
index b28c7f5..2134145 100644
--- a/src/targets/teams.js
+++ b/src/targets/teams.js
@@ -282,7 +282,17 @@ const default_inputs = {
   only_failures: false,
   include_failure_details: false,
   width: '',
-  duration: ''
+  duration: '',
+  metrics: [
+    {
+      "name": "Samples",
+    },
+    {
+      "name": "Duration",
+      "condition": "always",
+      "fields": ["avg", "p95"]
+    }
+  ]
 }
 
 module.exports = {


Test patch:
diff --git a/test/mocks/chat.mock.js b/test/mocks/chat.mock.js
index f9bbfb2..b8fd259 100644
--- a/test/mocks/chat.mock.js
+++ b/test/mocks/chat.mock.js
@@ -455,7 +455,7 @@ addInteractionHandler('post test-summary to chat for JMeter', () => {
                 "widgets": [
                   {
                     "textParagraph": {
-                      "text": "<b>TOTAL</b><br><br><b>Results</b>: undefined / undefined Passed (0%)<br><br><b>Samples</b>: 39 0.55535/s<br><b>Duration</b>: avg=4.6s ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s<br><b>Errors</b>: 0 %<br><b>Data Sent</b>: 0 38.87 KB/sec<br><b>Data Received</b>: 0 5166.44 KB/sec"
+                      "text": "<b>TOTAL</b><br><br><b>Results</b>: undefined / undefined Passed (0%)<br><br><b>Samples</b>: 39 0.55535/s<br><b>Duration</b>: avg=4.6s ｜ p95=11.4s"
                     }
                   }
                 ]
@@ -464,7 +464,7 @@ addInteractionHandler('post test-summary to chat for JMeter', () => {
                 "widgets": [
                   {
                     "textParagraph": {
-                      "text": "<b>✅ S01_T01_Application_Launch</b><br><br><b>Samples</b>: 10 0.14422/s<br><b>Duration</b>: avg=3s ｜ min=2.1s ｜ med=2.8s ｜ max=3.7s ｜ p90=3.7s ｜ p95=3.7s ｜ p99=3.7s<br><b>Errors</b>: 0.001 %<br><b>Data Sent</b>: 0 5.36 KB/sec<br><b>Data Received</b>: 0 2662.79 KB/sec<br><br><b>✅ S01_T02_Application_Login</b><br><br><b>Samples</b>: 9 0.1461/s<br><b>Duration</b>: avg=4.3s ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s<br><b>Errors</b>: 0 %<br><b>Data Sent</b>: 0 12.94 KB/sec<br><b>Data Received</b>: 0 2754.9 KB/sec"
+                      "text": "<b>✅ S01_T01_Application_Launch</b><br><br><b>Samples</b>: 10 0.14422/s<br><b>Duration</b>: avg=3s ｜ p95=3.7s<br><br><b>✅ S01_T02_Application_Login</b><br><br><b>Samples</b>: 9 0.1461/s<br><b>Duration</b>: avg=4.3s ｜ p95=10.7s"
                     }
                   }
                 ]
@@ -493,7 +493,7 @@ addInteractionHandler('post test-summary with failures to chat for failed JMeter
                 "widgets": [
                   {
                     "textParagraph": {
-                      "text": "<b>TOTAL 1.2.3</b><br><br><b>Results</b>: undefined / undefined Passed (0%)<br><br><b>Samples</b>: 39 0.55535/s<br><b>Duration</b>: 🔺 avg=4.6s (+1.1s) ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s<br><b>Errors</b>: 0 %<br><b>Data Sent</b>: 0 38.87 KB/sec<br><b>Data Received</b>: 0 5166.44 KB/sec"
+                      "text": "<b>TOTAL 1.2.3</b><br><br><b>Results</b>: undefined / undefined Passed (0%)<br><br><b>Samples</b>: 39 0.55535/s<br><b>Duration</b>: 🔺 avg=4.6s (+1.1s) ｜ p95=11.4s"
                     }
                   }
                 ]
@@ -502,7 +502,7 @@ addInteractionHandler('post test-summary with failures to chat for failed JMeter
                 "widgets": [
                   {
                     "textParagraph": {
-                      "text": "<b>❌ S01_T02_Application_Login</b><br><br><b>Samples</b>: 🔻 9 (-1) 0.1461/s<br><b>Duration</b>: 🔺 avg=4.3s (+855ms) ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s<br><b>Errors</b>: 0 %<br><b>Data Sent</b>: 0 12.94 KB/sec<br><b>Data Received</b>: 0 2754.9 KB/sec"
+                      "text": "<b>❌ S01_T02_Application_Login</b><br><br><b>Samples</b>: 🔻 9 (-1) 0.1461/s<br><b>Duration</b>: 🔺 avg=4.3s (+855ms) ｜ p95=10.7s"
                     }
                   }
                 ]
diff --git a/test/mocks/influx.mock.js b/test/mocks/influx.mock.js
index 28bb37d..73a1824 100644
--- a/test/mocks/influx.mock.js
+++ b/test/mocks/influx.mock.js
@@ -11,7 +11,7 @@ addInteractionHandler('save perf results', () => {
       queryParams: {
         "db": "TestResults"
       },
-      body: "PerfRun,Name=TOTAL,Status=PASS status=0,transactions=2,transactions_passed=2,transactions_failed=0,samples_sum=39,samples_rate=0.55535,duration_avg=4660,duration_med=3318,duration_max=15513,duration_min=1135,duration_p90=11354,duration_p95=11446,duration_p99=15513,errors_sum=0,errors_rate=0,data_sent_sum=0,data_sent_rate=38.87,data_received_sum=0,data_received_rate=5166.44\nPerfTransaction,Name=S01_T01_Application_Launch,Status=PASS status=0,samples_sum=10,samples_rate=0.14422,duration_avg=3086,duration_med=2832,duration_max=3797,duration_min=2119,duration_p90=3795,duration_p95=3795,duration_p99=3797,errors_sum=0,errors_rate=0.001,data_sent_sum=0,data_sent_rate=5.36,data_received_sum=0,data_received_rate=2662.79\nPerfTransaction,Name=S01_T02_Application_Login,Status=PASS status=0,samples_sum=9,samples_rate=0.1461,duration_avg=4355,duration_med=3273,duration_max=10786,duration_min=3042,duration_p90=4416,duration_p95=10786,duration_p99=10786,errors_sum=0,errors_rate=0,data_sent_sum=0,data_sent_rate=12.94,data_received_sum=0,data_received_rate=2754.9"
+      body: "PerfRun,Name=TOTAL,Status=PASS status=0,transactions=2,transactions_passed=2,transactions_failed=0,samples_sum=39,samples_rate=0.55535,duration_avg=4660,duration_med=3318,duration_max=15513,duration_min=1135,duration_p90=11354,duration_p95=11446,duration_p99=15513,errors_sum=0,errors_rate=0,data_sent_sum=2729683,data_sent_rate=38.87,data_received_sum=362818330,data_received_rate=5166.44\nPerfTransaction,Name=S01_T01_Application_Launch,Status=PASS status=0,samples_sum=10,samples_rate=0.14422,duration_avg=3086,duration_med=2832,duration_max=3797,duration_min=2119,duration_p90=3795,duration_p95=3795,duration_p99=3797,errors_sum=0,errors_rate=0.001,data_sent_sum=371654,data_sent_rate=5.36,data_received_sum=184633892,data_received_rate=2662.79\nPerfTransaction,Name=S01_T02_Application_Login,Status=PASS status=0,samples_sum=9,samples_rate=0.1461,duration_avg=4355,duration_med=3273,duration_max=10786,duration_min=3042,duration_p90=4416,duration_p95=10786,duration_p99=10786,errors_sum=0,errors_rate=0,data_sent_sum=797125,data_sent_rate=12.94,data_received_sum=169706365,data_received_rate=2754.9"
     },
     response: {
       status: 200
@@ -30,7 +30,7 @@ addInteractionHandler('save perf results with custom tags and fields', () => {
       queryParams: {
         "db": "TestResults"
       },
-      body: "PerfRun,Team=QA,App=PactumJS,Name=TOTAL,Status=PASS status=0,transactions=2,transactions_passed=2,transactions_failed=0,samples_sum=39,samples_rate=0.55535,duration_avg=4660,duration_med=3318,duration_max=15513,duration_min=1135,duration_p90=11354,duration_p95=11446,duration_p99=15513,errors_sum=0,errors_rate=0,data_sent_sum=0,data_sent_rate=38.87,data_received_sum=0,data_received_rate=5166.44\nPerfTransaction,Team=QA,App=PactumJS,Name=S01_T01_Application_Launch,Status=PASS id=123,status=0,samples_sum=10,samples_rate=0.14422,duration_avg=3086,duration_med=2832,duration_max=3797,duration_min=2119,duration_p90=3795,duration_p95=3795,duration_p99=3797,errors_sum=0,errors_rate=0.001,data_sent_sum=0,data_sent_rate=5.36,data_received_sum=0,data_received_rate=2662.79\nPerfTransaction,Team=QA,App=PactumJS,Name=S01_T02_Application_Login,Status=PASS id=123,status=0,samples_sum=9,samples_rate=0.1461,duration_avg=4355,duration_med=3273,duration_max=10786,duration_min=3042,duration_p90=4416,duration_p95=10786,duration_p99=10786,errors_sum=0,errors_rate=0,data_sent_sum=0,data_sent_rate=12.94,data_received_sum=0,data_received_rate=2754.9"
+      body: "PerfRun,Team=QA,App=PactumJS,Name=TOTAL,Status=PASS id=123,status=0,transactions=2,transactions_passed=2,transactions_failed=0,samples_sum=39,samples_rate=0.55535,duration_avg=4660,duration_med=3318,duration_max=15513,duration_min=1135,duration_p90=11354,duration_p95=11446,duration_p99=15513,errors_sum=0,errors_rate=0,data_sent_sum=2729683,data_sent_rate=38.87,data_received_sum=362818330,data_received_rate=5166.44\nPerfTransaction,Team=QA,App=PactumJS,Name=S01_T01_Application_Launch,Status=PASS id=123,status=0,samples_sum=10,samples_rate=0.14422,duration_avg=3086,duration_med=2832,duration_max=3797,duration_min=2119,duration_p90=3795,duration_p95=3795,duration_p99=3797,errors_sum=0,errors_rate=0.001,data_sent_sum=371654,data_sent_rate=5.36,data_received_sum=184633892,data_received_rate=2662.79\nPerfTransaction,Team=QA,App=PactumJS,Name=S01_T02_Application_Login,Status=PASS id=123,status=0,samples_sum=9,samples_rate=0.1461,duration_avg=4355,duration_med=3273,duration_max=10786,duration_min=3042,duration_p90=4416,duration_p95=10786,duration_p99=10786,errors_sum=0,errors_rate=0,data_sent_sum=797125,data_sent_rate=12.94,data_received_sum=169706365,data_received_rate=2754.9"
     },
     response: {
       status: 200
diff --git a/test/mocks/slack.mock.js b/test/mocks/slack.mock.js
index 45101f8..0c65dc5 100644
--- a/test/mocks/slack.mock.js
+++ b/test/mocks/slack.mock.js
@@ -520,21 +520,21 @@ addInteractionHandler('post test-summary to slack for JMeter', () => {
                 "type": "section",
                 "text": {
                   "type": "mrkdwn",
-                  "text": "*TOTAL*\n\n*Results*: 2 / 2 Passed (100%)\n*Samples*: 39 0.55535/s\n*Duration*: avg=4.6s ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s\n*Errors*: 0 %\n*Data Sent*: 0 38.87 KB/sec\n*Data Received*: 0 5166.44 KB/sec"
+                  "text": "*TOTAL*\n\n*Results*: 2 / 2 Passed (100%)\n*Samples*: 39 0.55535/s\n*Duration*: avg=4.6s ｜ p95=11.4s"
                 }
               },
               {
                 "type": "section",
                 "text": {
                   "type": "mrkdwn",
-                  "text": "*S01_T01_Application_Launch*\n\n*Samples*: 10 0.14422/s\n*Duration*: avg=3s ｜ min=2.1s ｜ med=2.8s ｜ max=3.7s ｜ p90=3.7s ｜ p95=3.7s ｜ p99=3.7s\n*Errors*: 0.001 %\n*Data Sent*: 0 5.36 KB/sec\n*Data Received*: 0 2662.79 KB/sec"
+                  "text": "*S01_T01_Application_Launch*\n\n*Samples*: 10 0.14422/s\n*Duration*: avg=3s ｜ p95=3.7s"
                 }
               },
               {
                 "type": "section",
                 "text": {
                   "type": "mrkdwn",
-                  "text": "*S01_T02_Application_Login*\n\n*Samples*: 9 0.1461/s\n*Duration*: avg=4.3s ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s\n*Errors*: 0 %\n*Data Sent*: 0 12.94 KB/sec\n*Data Received*: 0 2754.9 KB/sec"
+                  "text": "*S01_T02_Application_Login*\n\n*Samples*: 9 0.1461/s\n*Duration*: avg=4.3s ｜ p95=10.7s"
                 }
               }
             ]
@@ -562,14 +562,14 @@ addInteractionHandler('post test-summary with failures to slack for failed JMete
                 "type": "section",
                 "text": {
                   "type": "mrkdwn",
-                  "text": "*TOTAL 1.2.3*\n\n*Results*: 1 / 2 Passed (50%)\n*Samples*: 39 0.55535/s\n*Duration*: 🔺 avg=4.6s (+1.1s) ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s\n*Errors*: 0 %\n*Data Sent*: 0 38.87 KB/sec\n*Data Received*: 0 5166.44 KB/sec"
+                  "text": "*TOTAL 1.2.3*\n\n*Results*: 1 / 2 Passed (50%)\n*Samples*: 39 0.55535/s\n*Duration*: 🔺 avg=4.6s (+1.1s) ｜ p95=11.4s"
                 }
               },
               {
                 "type": "section",
                 "text": {
                   "type": "mrkdwn",
-                  "text": "*S01_T02_Application_Login 1.2.3*\n\n*Samples*: 🔻 9 (-1) 0.1461/s\n*Duration*: 🔺 avg=4.3s (+855ms) ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s\n*Errors*: 0 %\n*Data Sent*: 0 12.94 KB/sec\n*Data Received*: 0 2754.9 KB/sec"
+                  "text": "*S01_T02_Application_Login 1.2.3*\n\n*Samples*: 🔻 9 (-1) 0.1461/s\n*Duration*: 🔺 avg=4.3s (+855ms) ｜ p95=10.7s"
                 }
               }
             ]
diff --git a/test/mocks/teams.mock.js b/test/mocks/teams.mock.js
index 075af69..a72c580 100644
--- a/test/mocks/teams.mock.js
+++ b/test/mocks/teams.mock.js
@@ -1022,19 +1022,7 @@ addInteractionHandler('post test-summary to teams for JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "avg=4.6s ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 38.87 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 5166.44 KB/sec"
+                      "value": "avg=4.6s ｜ p95=11.4s"
                     }
                   ]
                 },
@@ -1054,19 +1042,7 @@ addInteractionHandler('post test-summary to teams for JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "avg=3s ｜ min=2.1s ｜ med=2.8s ｜ max=3.7s ｜ p90=3.7s ｜ p95=3.7s ｜ p99=3.7s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0.001 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 5.36 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 2662.79 KB/sec"
+                      "value": "avg=3s ｜ p95=3.7s"
                     }
                   ]
                 },
@@ -1086,19 +1062,7 @@ addInteractionHandler('post test-summary to teams for JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "avg=4.3s ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 12.94 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 2754.9 KB/sec"
+                      "value": "avg=4.3s ｜ p95=10.7s"
                     }
                   ]
                 }
@@ -1155,19 +1119,7 @@ addInteractionHandler('post test-summary to teams for failed JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "🔺 avg=4.6s (+1.1s) ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 38.87 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 5166.44 KB/sec"
+                      "value": "🔺 avg=4.6s (+1.1s) ｜ p95=11.4s"
                     }
                   ]
                 },
@@ -1187,19 +1139,7 @@ addInteractionHandler('post test-summary to teams for failed JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "avg=3s ｜ min=2.1s ｜ med=2.8s ｜ max=3.7s ｜ p90=3.7s ｜ p95=3.7s ｜ p99=3.7s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0.001 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 5.36 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 2662.79 KB/sec"
+                      "value": "avg=3s ｜ p95=3.7s"
                     }
                   ]
                 },
@@ -1219,19 +1159,7 @@ addInteractionHandler('post test-summary to teams for failed JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "🔺 avg=4.3s (+855ms) ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 12.94 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 2754.9 KB/sec"
+                      "value": "🔺 avg=4.3s (+855ms) ｜ p95=10.7s"
                     }
                   ]
                 }
@@ -1288,19 +1216,7 @@ addInteractionHandler('post test-summary-slim to teams for JMeter', () => {
                     },
                     {
                       "title": "Duration:",
-                      "value": "avg=4.6s ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 38.87 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 5166.44 KB/sec"
+                      "value": "avg=4.6s ｜ p95=11.4s"
                     }
                   ]
                 },
@@ -1357,19 +1273,7 @@ addInteractionHandler('post test-summary with failures to teams for failed JMete
                     },
                     {
                       "title": "Duration:",
-                      "value": "🔺 avg=4.6s (+1.1s) ｜ min=1.1s ｜ med=3.3s ｜ max=15.5s ｜ p90=11.3s ｜ p95=11.4s ｜ p99=15.5s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 38.87 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 5166.44 KB/sec"
+                      "value": "🔺 avg=4.6s (+1.1s) ｜ p95=11.4s"
                     }
                   ]
                 },
@@ -1389,19 +1293,7 @@ addInteractionHandler('post test-summary with failures to teams for failed JMete
                     },
                     {
                       "title": "Duration:",
-                      "value": "🔺 avg=4.3s (+855ms) ｜ min=3s ｜ med=3.2s ｜ max=10.7s ｜ p90=4.4s ｜ p95=10.7s ｜ p99=10.7s"
-                    },
-                    {
-                      "title": "Errors:",
-                      "value": "0 %"
-                    },
-                    {
-                      "title": "Data Sent:",
-                      "value": "0 12.94 KB/sec"
-                    },
-                    {
-                      "title": "Data Received:",
-                      "value": "0 2754.9 KB/sec"
+                      "value": "🔺 avg=4.3s (+855ms) ｜ p95=10.7s"
                     }
                   ]
                 }
diff --git a/test/targets.influx.spec.js b/test/targets.influx.spec.js
index ff6b858..56a8c22 100644
--- a/test/targets.influx.spec.js
+++ b/test/targets.influx.spec.js
@@ -36,7 +36,7 @@ describe('targets - influx - performance', () => {
     assert.equal(mock.getInteraction(id).exercised, true);
   });
 
-  it('should save results with custom tags', async () => {
+  it('should save results with custom tags and fields', async () => {
     const id = mock.addInteraction('save perf results with custom tags and fields');
     await publish({
       config: {
@@ -55,7 +55,7 @@ describe('targets - influx - performance', () => {
                     "App": "PactumJS"
                   },
                   "fields": {
-                    "id": "123",
+                    "id": 123,
                   }
                 }
               }
@@ -134,7 +134,7 @@ describe('targets - influx - functional', () => {
                     "App": "PactumJS"
                   },
                   "fields": {
-                    "id": "123",
+                    "id": 123,
                   }
                 }
               }