Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bitdiver/runner-server

Package Overview
Dependencies
Maintainers
2
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitdiver/runner-server - npm Package Compare versions

Comparing version 1.1.11 to 1.2.0

log/Run_1527849936962/2018-06-01_10:45:36.994_info.json

56

lib/Runner.js

@@ -7,2 +7,6 @@ 'use strict';

var _extends2 = require('babel-runtime/helpers/extends');
var _extends3 = _interopRequireDefault(_extends2);
var _map = require('babel-runtime/core-js/map');

@@ -134,3 +138,4 @@

async _doRunBatch(opts = {}) {
await this._logStartRun();
const stepCount = (0, _keys2.default)(this.steps).length;
await this._logStartRun({ testCaseCount: this.testcases.length, stepCount });

@@ -147,4 +152,2 @@ const testMode = opts.testMode ? opts.testMode : false;

const stepCount = (0, _keys2.default)(this.steps).length;
// first iterate the steps and then the testscases

@@ -240,6 +243,36 @@ for (let i = 0; i < stepIds.length; i++) {

await this._logEndRun();
await this._logEndRun(this._getRunStatus());
}
/**
* Computes the status of this run and returns an object with the detail information
* @return status {object} An object with the status summary of this run
*/
_getRunStatus() {
const testCaseCount = this.testcases.length;
const stepCount = (0, _keys2.default)(this.steps).length;
let fail = 0;
let unknown = 0;
let warn = 0;
let pass = 0;
for (const tcEnvId of this.environmentTestcaseIds) {
const tcEnv = this.environmentTestcaseMap.get(tcEnvId);
if (tcEnv.status === _model.STATUS_WARNING) {
warn++;
} else if (tcEnv.status === _model.STATUS_ERROR) {
fail++;
} else if (tcEnv.status === _model.STATUS_FATAL) {
fail++;
} else if (tcEnv.status === _model.STATUS_OK) {
pass++;
} else if (tcEnv.status === _model.STATUS_UNKNOWN) {
unknown++;
}
}
return { testCaseCount, stepCount, status: { fail, unknown, warn, pass } };
}
/**
* ends all the testcases and writes the status to the logger

@@ -253,3 +286,4 @@ */

for (const environmentTestcase of this.environmentTestcaseMap.values()) {
if (this.environmentRun.status > _model.STATUS_ERROR) {
if (this.environmentRun.status === _model.STATUS_FATAL && environmentTestcase.status < _model.STATUS_ERROR) {
// The run aborted due to some error end the testcase was not yet finished
environmentTestcase.status = _model.STATUS_UNKNOWN;

@@ -406,7 +440,7 @@ }

*/
_logStartRun() {
const data = {
_logStartRun(opts = {}) {
const data = (0, _extends3.default)({
message: 'Start Run',
suite: this.name
};
}, opts);
return (0, _model.generateLogs)(this.environmentRun, undefined, this.logAdapter, data, _model.LEVEL_INFO);

@@ -419,8 +453,8 @@ }

*/
_logEndRun() {
const data = {
_logEndRun(opts = {}) {
const data = (0, _extends3.default)({
message: 'Stop Run',
suite: this.name,
status: this.environmentRun.status
};
}, opts);
return (0, _model.generateLogs)(this.environmentRun, undefined, this.logAdapter, data, _model.LEVEL_INFO);

@@ -427,0 +461,0 @@ }

2

package.json
{
"name": "@bitdiver/runner-server",
"version": "1.1.11",
"version": "1.2.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc