runner-runtime 1.0.21 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/events/api.js CHANGED
@@ -779,8 +779,8 @@ const convert2PostmanEvent = (request, listen, option) => {
779
779
  `,
780
780
 
781
781
  `
782
- const getMainProcessSocketPath = ()=>{
783
- return "${_.get(process, 'env.main_process_socket_path')}"
782
+ const getMainProcessSocketPath = ()=>{
783
+ return "${_.get(process, 'env.ELECTRON_PIPE')}"
784
784
  }
785
785
  `,
786
786
 
package/libs/utils.js CHANGED
@@ -480,10 +480,10 @@ const formatAutotestReport = (startTimeAt, eventResultList) => {
480
480
  let totalResponseSize = 0, totalResponseTime = 0
481
481
 
482
482
  _.forEach(eventResultList, (item) => {
483
- if (item?.type === 'api') {
483
+ if (_.includes(['api', 'sample'], item?.type)) {
484
484
  report.http.total++;
485
- totalResponseSize = totalResponseSize + _.toInteger(item?.response?.responseSize);
486
- totalResponseTime = totalResponseTime + _.toInteger(item?.response?.responseTime);
485
+ totalResponseSize = totalResponseSize + _.toInteger(item?.response?.response_size);
486
+ totalResponseTime = totalResponseTime + _.toInteger(item?.response?.response_time);
487
487
 
488
488
  if (!_.isEmpty(item?.status?.assert) && _.isArray(item?.status?.assert)) {
489
489
  const assertFailure = _.map(item?.status?.assert, (assertItem) => {
@@ -502,8 +502,8 @@ const formatAutotestReport = (startTimeAt, eventResultList) => {
502
502
 
503
503
  report.http.success = report.http.total - report.http.error;
504
504
  report.assert.success = report.assert.total - report.assert.error;
505
- report.avg_response_time = _.round(totalResponseTime / report.http.total, 2);
506
- report.avg_response_size = _.round(totalResponseSize / report.http.total, 2);
505
+ report.avg_response_time = _.round(totalResponseTime / report.http.total, 2) || 0;
506
+ report.avg_response_size = _.round(totalResponseSize / report.http.total, 2) || 0;
507
507
  report.total_response_time = totalResponseTime;
508
508
  report.total_response_size = totalResponseSize;
509
509
  return report;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "runner-runtime",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "description": "runner-runtime.",
5
5
  "main": "index.js",
6
6
  "scripts": {