@bitdiver/runner-server
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -10,7 +10,7 @@ 'use strict'; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _assert = _interopRequireDefault(require("assert")); | ||
var _uuid = _interopRequireDefault(require("uuid")); | ||
var _uuid = require("uuid"); | ||
@@ -29,4 +29,6 @@ var _pAll = _interopRequireDefault(require("p-all")); | ||
const uuidV4 = _uuid.default.v4; | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
/** | ||
@@ -247,3 +249,3 @@ * The runner executes a suite | ||
if (tcEnv.status < _model.STATUS_ERROR && tcEnv.running || step.runOnError) { | ||
if (tcEnv.status < _model.STATUS_ERROR && tcEnv.running || step.runOnError && tcEnv.status < _model.STATUS_FATAL) { | ||
step.countCurrent = i + 1; | ||
@@ -459,3 +461,3 @@ step.countAll = stepCount; | ||
_prepare(suite) { | ||
this.id = uuidV4(); | ||
this.id = (0, _uuid.v4)(); | ||
@@ -506,6 +508,7 @@ if (suite.name !== undefined) { | ||
_logStartRun(opts = {}) { | ||
const data = (0, _objectSpread2.default)({ | ||
const data = _objectSpread({ | ||
message: 'Start Run', | ||
suite: this.name | ||
}, opts); | ||
return (0, _model.generateLogs)(this.environmentRun, undefined, this.logAdapter, data, _logadapter.LEVEL_INFO); | ||
@@ -520,3 +523,3 @@ } | ||
_logEndRun(opts = {}) { | ||
const data = (0, _objectSpread2.default)({ | ||
const data = _objectSpread({ | ||
message: 'Stop Run', | ||
@@ -526,2 +529,3 @@ suite: this.name, | ||
}, opts); | ||
return (0, _model.generateLogs)(this.environmentRun, undefined, this.logAdapter, data, _logadapter.LEVEL_INFO); | ||
@@ -528,0 +532,0 @@ } |
{ | ||
"name": "@bitdiver/runner-server", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "", | ||
@@ -40,36 +40,37 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "7.4.3", | ||
"@babel/core": "7.4.3", | ||
"@babel/node": "7.2.2", | ||
"@babel/plugin-proposal-object-rest-spread": "7.4.3", | ||
"@babel/plugin-transform-runtime": "7.4.3", | ||
"@babel/polyfill": "7.4.3", | ||
"@babel/preset-env": "7.4.3", | ||
"@babel/register": "7.4.0", | ||
"@babel/cli": "7.8.4", | ||
"@babel/core": "7.9.0", | ||
"@babel/node": "7.8.7", | ||
"@babel/plugin-proposal-object-rest-spread": "7.9.0", | ||
"@babel/plugin-transform-runtime": "7.9.0", | ||
"@babel/polyfill": "7.8.7", | ||
"@babel/preset-env": "7.9.0", | ||
"@babel/register": "7.9.0", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-eslint": "10.0.1", | ||
"babel-jest": "24.7.1", | ||
"cz-conventional-changelog": "2.1.0", | ||
"eslint": "5.16.0", | ||
"eslint-config-prettier": "4.1.0", | ||
"babel-eslint": "10.1.0", | ||
"babel-jest": "25.2.4", | ||
"cz-conventional-changelog": "3.1.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.10.1", | ||
"eslint-plugin-babel": "5.3.0", | ||
"jest": "24.7.1", | ||
"jest-cli": "24.7.1", | ||
"jest": "25.2.4", | ||
"jest-cli": "25.2.4", | ||
"jest-environment-node-debug": "2.0.0", | ||
"prettier": "1.17.0", | ||
"regenerator-runtime": "0.13.2", | ||
"rimraf": "2.6.3", | ||
"semantic-release": "15.13.3" | ||
"mkdirp": "1.0.3", | ||
"prettier": "2.0.2", | ||
"regenerator-runtime": "0.13.5", | ||
"rimraf": "3.0.2", | ||
"semantic-release": "17.0.4" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "7.4.3", | ||
"@bitdiver/definition": "2.0.0", | ||
"@bitdiver/logadapter": "1.4.2", | ||
"@bitdiver/model": "2.0.0", | ||
"mkdirp": "0.5.1", | ||
"@babel/runtime": "7.9.2", | ||
"@bitdiver/definition": "2.0.1", | ||
"@bitdiver/logadapter": "1.4.3", | ||
"@bitdiver/model": "2.0.1", | ||
"moment": "2.24.0", | ||
"p-all": "2.1.0", | ||
"p-all": "3.0.0", | ||
"sprintf-js": "1.1.2", | ||
"ts-progress": "0.1.7" | ||
"ts-progress": "0.1.7", | ||
"uuid": "^7.0.2" | ||
} | ||
} |
@@ -84,3 +84,3 @@ import { StepBase } from '@bitdiver/model' | ||
return new Promise(resolve => { | ||
return new Promise((resolve) => { | ||
const time = Math.floor(Math.random() * (max - min)) + min | ||
@@ -87,0 +87,0 @@ setTimeout(() => { |
@@ -6,3 +6,3 @@ import StepNormal from './StepNormal' | ||
test.skip('Run normal without any errors', async done => { | ||
test.skip('Run normal without any errors', async (done) => { | ||
const step = new StepNormal() | ||
@@ -15,3 +15,3 @@ step.logger = logAdapter | ||
const methods = ['run', 'beforeRun'] | ||
methods.forEach(async method => { | ||
methods.forEach(async (method) => { | ||
await step[method]() | ||
@@ -18,0 +18,0 @@ }) |
@@ -14,3 +14,3 @@ import StepNormal from './StepNormal' | ||
_work(method) { | ||
this.data.forEach(dat => { | ||
this.data.forEach((dat) => { | ||
if (dat[method] !== undefined) { | ||
@@ -34,3 +34,3 @@ // Ok there is an action defined for this method | ||
}) | ||
return new Promise(resolve => { | ||
return new Promise((resolve) => { | ||
const min = 5 | ||
@@ -37,0 +37,0 @@ const max = 100 |
@@ -42,3 +42,3 @@ export default class StepTestQueue { | ||
async run() { | ||
return new Promise(resolve => { | ||
return new Promise((resolve) => { | ||
// const min = 5 | ||
@@ -45,0 +45,0 @@ // const max = 100 |
import { createSuite, createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { ProgressBarConsoleLogBatchJson } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { ProgressBarConsoleLogBatchJson } from '../src/index' | ||
import { getLogAdapterMemory, getLogAdapterFile } from '@bitdiver/logadapter' | ||
@@ -15,3 +15,3 @@ | ||
'Run with file logAdapter', | ||
async done => { | ||
async (done) => { | ||
const options = { | ||
@@ -18,0 +18,0 @@ parallelExecution: true, |
import { createSuite, createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { ProgressBarConsoleLogBatch } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { ProgressBarConsoleLogBatch } from '../src/index' | ||
import { getLogAdapterMemory, getLogAdapterFile } from '@bitdiver/logadapter' | ||
@@ -16,3 +16,3 @@ | ||
'Run with file logAdapter', | ||
async done => { | ||
async (done) => { | ||
const options = { | ||
@@ -19,0 +19,0 @@ parallelExecution: true, |
import { createSuite, createRegistry } from './helper/helper' | ||
import { Runner, ProgressBarConsole } from '../lib/index' | ||
import { Runner, ProgressBarConsole } from '../src/index' | ||
import { getLogAdapterMemory } from '@bitdiver/logadapter' | ||
@@ -39,4 +39,4 @@ | ||
}) | ||
.catch(err => { | ||
.catch((err) => { | ||
console.log('ERROR: ', err) // eslint-disable-line no-console | ||
}) |
@@ -14,7 +14,6 @@ /** | ||
import { createSuite } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { ProgressMeterBatch } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { ProgressMeterBatch } from '../src/index' | ||
import { getLogAdapterMemory, getLogAdapterFile } from '@bitdiver/logadapter' | ||
const md = util.promisify(mkdirp) | ||
const writeFile = util.promisify(fs.writeFile) | ||
@@ -98,3 +97,3 @@ const readFile = util.promisify(fs.readFile) | ||
beforeAll(async () => { | ||
await md(VOLATILE) | ||
await mkdirp(VOLATILE) | ||
}) | ||
@@ -104,3 +103,3 @@ | ||
'Run with file logAdapter', | ||
async done => { | ||
async (done) => { | ||
RESULT = [] | ||
@@ -107,0 +106,0 @@ const options = { |
import { createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { getLogAdapterMemory } from '@bitdiver/logadapter' | ||
@@ -19,3 +19,3 @@ | ||
'Test that the steps are executed at the same time', | ||
async done => { | ||
async (done) => { | ||
const methods = ['beforeRun', 'run', 'afterRun'] | ||
@@ -22,0 +22,0 @@ const stepInstances = createSteps(5) |
@@ -6,3 +6,3 @@ import fs from 'fs' | ||
import { createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { getLogAdapterMemory } from '@bitdiver/logadapter' | ||
@@ -23,3 +23,3 @@ import { loadSuite } from '@bitdiver/definition' | ||
'Run with file logAdapter', | ||
async done => { | ||
async (done) => { | ||
const fileNameSuite = 'suite_normal.json' | ||
@@ -26,0 +26,0 @@ const fileNameLog = 'suite_normal_log.json' |
import { createSuite, createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
import { getLogAdapterMemory, getLogAdapterFile } from '@bitdiver/logadapter' | ||
@@ -16,3 +16,3 @@ | ||
'Run with file logAdapter', | ||
async done => { | ||
async (done) => { | ||
const options = { | ||
@@ -53,3 +53,3 @@ parallelExecution: true, | ||
'Run normal without any errors (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseNoErrors({ parallelExecution: true }) | ||
@@ -68,3 +68,3 @@ expect(res).toEqual({ | ||
'Run normal without any errors (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseNoErrors({ parallelExecution: false }) | ||
@@ -83,3 +83,3 @@ expect(res).toEqual({ | ||
'Run test case with status warning (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusWarning({ parallelExecution: true }) | ||
@@ -98,3 +98,3 @@ expect(res).toEqual({ | ||
'Run test case with status warning (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusWarning({ parallelExecution: false }) | ||
@@ -113,3 +113,3 @@ expect(res).toEqual({ | ||
'Run test case with status error (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusError({ parallelExecution: true }) | ||
@@ -128,3 +128,3 @@ expect(res).toEqual({ | ||
'Run test case with status error (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusError({ parallelExecution: false }) | ||
@@ -143,3 +143,3 @@ expect(res).toEqual({ | ||
'Run test case with exception (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusException({ | ||
@@ -172,3 +172,3 @@ parallelExecution: true, | ||
'Run test case with exception (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseHasStatusException({ | ||
@@ -202,3 +202,3 @@ parallelExecution: false, | ||
'Run test case with status fatal (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseAll({ | ||
@@ -226,3 +226,3 @@ parallelExecution: false, | ||
'Run test case with status fatal (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseAll({ | ||
@@ -249,3 +249,3 @@ parallelExecution: false, | ||
'Run test case with status error on single step (Parallel Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseAll({ | ||
@@ -286,3 +286,3 @@ parallelExecution: true, | ||
'Run test case with status error on single step (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const res = await runTestcaseAll({ | ||
@@ -321,3 +321,3 @@ parallelExecution: false, | ||
'Run test case with step runOnError=true (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const options = { | ||
@@ -389,3 +389,3 @@ parallelExecution: false, | ||
'Run test case with step singleRunOnError=true (Linear Execution)', | ||
async done => { | ||
async (done) => { | ||
const options = { | ||
@@ -536,3 +536,3 @@ parallelExecution: false, | ||
const tcNames = Object.keys(logAdapter.logs[runIds[0]].testcases) | ||
tcNames.forEach(tcName => { | ||
tcNames.forEach((tcName) => { | ||
// get the test case log part | ||
@@ -539,0 +539,0 @@ const tcLog = logAdapter.logs[runIds[0]].testcases[tcName] |
@@ -5,3 +5,3 @@ import { StepBase } from '@bitdiver/model' | ||
import { createSuite, createRegistry } from './helper/helper' | ||
import { Runner } from '../lib/index' | ||
import { Runner } from '../src/index' | ||
@@ -8,0 +8,0 @@ import heapdump from 'heapdump' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
386984
12452
23
+ Addeduuid@^7.0.2
+ Added@babel/runtime@7.9.2(transitive)
+ Added@bitdiver/definition@2.0.1(transitive)
+ Added@bitdiver/logadapter@1.4.3(transitive)
+ Added@bitdiver/model@2.0.1(transitive)
+ Addedaggregate-error@3.1.0(transitive)
+ Addedclean-stack@2.2.0(transitive)
+ Addedindent-string@4.0.0(transitive)
+ Addedmkdirp@1.0.3(transitive)
+ Addedp-all@3.0.0(transitive)
+ Addedp-map@4.0.0(transitive)
+ Addeduuid@7.0.27.0.3(transitive)
- Removedmkdirp@0.5.1
- Removed@babel/runtime@7.4.3(transitive)
- Removed@bitdiver/definition@2.0.0(transitive)
- Removed@bitdiver/logadapter@1.4.11.4.2(transitive)
- Removed@bitdiver/model@2.0.0(transitive)
- Removedminimist@0.0.8(transitive)
- Removedmkdirp@0.5.1(transitive)
- Removedp-all@2.1.0(transitive)
- Removedp-map@2.1.0(transitive)
- Removeduuid@3.3.2(transitive)
Updated@babel/runtime@7.9.2
Updated@bitdiver/definition@2.0.1
Updated@bitdiver/logadapter@1.4.3
Updated@bitdiver/model@2.0.1
Updatedp-all@3.0.0