🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

newman-parallel

Package Overview
Dependencies
Maintainers
0
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

newman-parallel - npm Package Compare versions

Comparing version

to
1.0.14

0

index.js

@@ -0,0 +0,0 @@ #!/usr/bin/env node

2

package.json
{
"name": "newman-parallel",
"version": "1.0.12",
"version": "1.0.14",
"description": "A framework to execute multiple Postman collections in parallel run with Newman.Includes Allure, HTML-extra and Junit reporters integrations",

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

@@ -0,0 +0,0 @@ # Newman Parallel

@@ -169,29 +169,36 @@ const async = require('async')

}
const collectionToRun = collections.map(collection => {
// @ts-ignore
const file_name = collection
.split('/')
.at(-1)
.replace('.postman_collection.json', `_${env}`)
return {
collection: collection,
environment: environment,
insecure: true,
iterationData: data,
reporters: NewmanRunner.NEWMAN_REPORT_OPTIONS,
reporter: {
htmlextra: {
export: `${NewmanRunner.NEWMAN_REPORT_PATH}${file_name}.html`
},
junitfull: {
export: `${NewmanRunner.NEWMAN_REPORT_PATH}${file_name}.xml`
},
'@felipecrs/allure': {
collectionAsParentSuite: true,
export: NewmanRunner.ALLURE_REPORT_PATH
let collectionsToRun
try {
collectionsToRun = collections.map(collection => {
// @ts-ignore
const file_name = collection
.split('/')
.at(-1)
.replace('.postman_collection.json', `_${env}`)
return {
collection: collection,
environment: environment,
insecure: true,
iterationData: data,
reporters: NewmanRunner.NEWMAN_REPORT_OPTIONS,
reporter: {
htmlextra: {
export: `${NewmanRunner.NEWMAN_REPORT_PATH}${file_name}.html`
},
junitfull: {
export: `${NewmanRunner.NEWMAN_REPORT_PATH}${file_name}.xml`
},
'@felipecrs/allure': {
collectionAsParentSuite: true,
export: NewmanRunner.ALLURE_REPORT_PATH
}
}
}
}
})
NewmanRunner.counter = collectionToRun.length
})
NewmanRunner.counter = collectionsToRun.length
} catch (err) {
console.error(`Error parsing collection names from folder ${args[0]}`)
console.log(`Files in folder: ${collections}`)
process.exit()
}

@@ -205,5 +212,5 @@ /**

const parallelCollectionRun = function (done) {
for (let index = 0; index < collectionToRun.length; index++) {
for (let index = 0; index < collectionsToRun.length; index++) {
newman
.run(collectionToRun[index], function (err) {
.run(collectionsToRun[index], function (err) {
if (err) {

@@ -225,4 +232,16 @@ throw err

'npx allure generate --clean && npx allure-patch ./allure-report && rm -r ./allure-results'
exec(createHistory)
exec(generateReport)
exec(createHistory, (error, stdout, stderr) => {
console.log(stdout)
console.error(stderr)
if (error) {
console.error(error)
}
})
exec(generateReport, (error, stdout, stderr) => {
console.log(stdout)
console.error(stderr)
if (error) {
console.error(error)
}
})
}

@@ -229,0 +248,0 @@ })

Sorry, the diff of this file is not supported yet