diff --git a/README.md b/README.md
index 2c0c22b..03bdcc8 100644
--- a/README.md
+++ b/README.md
@@ -3,14 +3,14 @@
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/schwabyio/xrun/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/@schwabyio%252Fxrun)](https://www.npmjs.com/package/@schwabyio/xrun) [![code coverage](https://img.shields.io/badge/Code%20Coverage-80.32%25-green)](https://img.shields.io)
## Table of Contents
-- [Overview](#overview)
-- [Features](#features)
-- [Demos](#demos)
- 1. [Demo Primary Commands](#demo-primary-commands)
- 2. [Demo Reporting](#demo-reporting)
-- [Installation Steps](#installation-steps)
-- [Usage](#usage)
-- [Settings](#settings)
+
+- [xRun - CLI Runner For Postman](#xrun---cli-runner-for-postman)
+ - [Overview](#overview)
+ - [Features](#features)
+ - [Installation Steps](#installation-steps)
+ - [Update Steps](#update-steps)
+ - [Usage](#usage)
+ - [Settings](#settings)
@@ -21,8 +21,8 @@
xRun is a command line interface (CLI) app that extends [Newman](https://github.com/postmanlabs/newman) to enable your organization to run Postman tests with speed and at scale.
## Features
-* Direct support for [xtest!](https://github.com/schwabyio/xtest)
-* Run Postman tests in parallel.
+* Direct support for [xtest](https://github.com/schwabyio/xtest).
+* Run Postman tests in parallel by setting the `limitConcurrency` configuration.
* Run tests locally or as part of Continuous Integration (CI) with your automated build server of choice.
* Generates beautiful html reports that allow you to quickly filter and zero in on test failures.
* Generate junit reports (provided by Postman's Newman).
@@ -31,29 +31,6 @@ xRun is a command line interface (CLI) app that extends [Newman](https://github.
* By default, all folders (and tests within) from the configured xRunProjectPath are run. You can exclude folders using an exclusion list.
* Single out one or more tests to run by specifying a CSV list of test cases from the command line.
-
-
-
-## Demos
-
-### Demo Primary Commands
-
-
-
-TODO
-
-
-
-
-### Demo Reporting
-
-
-
-TODO
-
-
-
-
## Installation Steps
@@ -85,17 +62,24 @@ npm install -g @schwabyio/xrun
% xrun
No settings path is currently set. Please provide one below.
What is the absolute path to your xrun settings.json file? /Users/john/xrun/settings.json
-The path you have provided is '/Users/john/xrun/settings.json
+The path you have provided is '/Users/john/xrun/settings.json'
```
+## Update Steps
+To update to the latest version and dependencies.
+1. Run the following command:
+```console
+npm update -g @schwabyio/xrun
+```
+
## Usage
```console
% xrun
__________________________________________________________________________________________________________________________________
- xRun Ver. 2.2.0
+ xRun Ver. 2.4.0
__________________________________________________________________________________________________________________________________
diff --git a/lib/getTrustedCaCertFilePath.js b/lib/getTrustedCaCertFilePath.js
new file mode 100644
index 0000000..da0ea83
--- /dev/null
+++ b/lib/getTrustedCaCertFilePath.js
@@ -0,0 +1,67 @@
+////////////////////////////////////////////////////////////////////////////////
+// getTrustedCaCertFilePath.js - Get absolute file path of trusted CA cert //
+// for Newman options.sslExtraCaCerts. //
+// //
+// Created by: schwaby.io //
+////////////////////////////////////////////////////////////////////////////////
+const { readdir } = require('node:fs/promises')
+const path = require('node:path')
+
+
+////////////////////////////////////////////////////////////////////////////////
+//
+////////////////////////////////////////////////////////////////////////////////
+const getTrustedCaCertFilePath = async function getTrustedCaCertFilePath(settings) {
+ const defaultTrustedCaCertDirectoryPath = 'trustedCaCert'
+ let directoryPath
+
+ //Check if settings.trustedCaCertDirectoryPath is an absolute path
+ if (path.isAbsolute(settings.trustedCaCertDirectoryPath)) {
+ directoryPath = settings.trustedCaCertDirectoryPath
+ } else {
+ //Need to join
+ directoryPath = path.join(settings.xRunProjectPath, settings.xRunProjectDirectoryName, settings.trustedCaCertDirectoryPath)
+ }
+
+ try {
+ const filePathArray = []
+
+ //Read directoryPath for a .pem file
+ const files = await readdir(directoryPath)
+
+ //Loop over all files
+ for (const fileName of files) {
+
+ //Only add files that match '.pem' file extension
+ if (path.extname(fileName) === '.pem') {
+ filePathArray.push(path.join(directoryPath, fileName))
+ }
+ }
+
+ if (filePathArray.length === 1) {
+ //There should only be one '.pem' file, return
+ return filePathArray[0]
+ } else if (filePathArray.length === 0) {
+ console.log(`WARNING: No '.pem' file was found within '${directoryPath}'`)
+ return null
+ } else {
+ console.log(`WARNING: Found more than one '.pem' file within '${directoryPath}'. Only using the first found '${filePathArray[0]}'`)
+ return filePathArray[0]
+ }
+
+ } catch (error) {
+ //Do not throw error
+
+ //Only display warnings when NOT using default trustedCaCertDirectoryPath
+ if (settings.trustedCaCertDirectoryPath !== defaultTrustedCaCertDirectoryPath) {
+ //Do not throw error, just display warningMessage
+ const warningMessage = `WARNING: unable to getTrustedCaCertFilePath(): ${error.code} '${directoryPath}' - ${error.message}`
+ console.log(warningMessage)
+ }
+
+ return null
+ }
+}
+
+
+module.exports = getTrustedCaCertFilePath
diff --git a/lib/getTrustedCaCertFilePath.test.js b/lib/getTrustedCaCertFilePath.test.js
new file mode 100644
index 0000000..c2d039c
--- /dev/null
+++ b/lib/getTrustedCaCertFilePath.test.js
@@ -0,0 +1,45 @@
+const path = require('node:path')
+
+const getTrustedCaCertFilePath = require('./getTrustedCaCertFilePath')
+
+test('successfully returns a path to a trustedCaCertFile', async() => {
+ const settings = {}
+ settings['xRunProjectPath'] = path.join(__dirname, '/unit-tests/test-data/test-project6')
+ settings['xRunProjectDirectoryName'] = 'xrun'
+ settings['trustedCaCertDirectoryPath'] = 'trustedCaCert'
+ const trustedCaCertFilePath = await getTrustedCaCertFilePath(settings)
+
+ expect(trustedCaCertFilePath).toContain('unit-tests/test-data/test-project6/xrun/trustedCaCert/successfulCaCert.pem')
+})
+
+
+test('No error occurs when trustedCaCertDirectoryPath does NOT exist and trustedCaCertFilePath === null', async() => {
+ const settings = {}
+ settings['xRunProjectPath'] = path.join(__dirname, '/unit-tests/test-data/test-project3')
+ settings['xRunProjectDirectoryName'] = 'xrun'
+ settings['trustedCaCertDirectoryPath'] = 'trustedCaCert'
+ const trustedCaCertFilePath = await getTrustedCaCertFilePath(settings)
+
+ expect(trustedCaCertFilePath).toBeNull()
+})
+
+test('successfully returns a path to a trustedCaCertFile when using a custom trustedCaCertDirectoryPath', async() => {
+ const settings = {}
+ settings['xRunProjectPath'] = path.join(__dirname, '/unit-tests/test-data/test-project7')
+ settings['xRunProjectDirectoryName'] = 'xrun'
+ settings['trustedCaCertDirectoryPath'] = 'customTrustedCaCertDirectory'
+ const trustedCaCertFilePath = await getTrustedCaCertFilePath(settings)
+
+ expect(trustedCaCertFilePath).toContain('unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert.pem')
+})
+
+
+test('successfully returns a path to a trustedCaCertFile when using an absolute path for trustedCaCertDirectoryPath', async() => {
+ const settings = {}
+ settings['xRunProjectPath'] = path.join(__dirname, '/unit-tests/test-data/test-project6')
+ settings['xRunProjectDirectoryName'] = 'xrun'
+ settings['trustedCaCertDirectoryPath'] = path.join(__dirname, '/unit-tests/test-data/trustedCaCertDirectory')
+ const trustedCaCertFilePath = await getTrustedCaCertFilePath(settings)
+
+ expect(trustedCaCertFilePath).toContain('/unit-tests/test-data/trustedCaCertDirectory/successfulCaCert.pem')
+})
\ No newline at end of file
diff --git a/lib/html-templates/template-xrun-collection.hbs b/lib/html-templates/template-xrun-collection.hbs
index db3f491..cdbb168 100644
--- a/lib/html-templates/template-xrun-collection.hbs
+++ b/lib/html-templates/template-xrun-collection.hbs
@@ -295,29 +295,36 @@
-
-
-
Response Code
-
{{code}} {{status}}
+ {{#if failureMessage}}
+
+ {{else}}
+
+
+
Response Code
+
{{code}} {{status}}
+
-
+
- {{#if body}}
-
- {{/if}}
+ {{#if body}}
+
+ {{/if}}
-
-
Response Time
-
{{responseTime}}ms
+
+
Response Time
+
{{responseTime}}ms
+
-
+ {{/if}}
diff --git a/lib/html-templates/template-xrun-summary.hbs b/lib/html-templates/template-xrun-summary.hbs
index 4d45bd6..233b010 100644
--- a/lib/html-templates/template-xrun-summary.hbs
+++ b/lib/html-templates/template-xrun-summary.hbs
@@ -99,14 +99,6 @@
{{timeoutScript}} ms
-
-
-
-
-
Script Timeout
-
{{timeoutScript}} ms
-
-
diff --git a/lib/json/settings-schema.json b/lib/json/settings-schema.json
index 622f194..101a1f0 100644
--- a/lib/json/settings-schema.json
+++ b/lib/json/settings-schema.json
@@ -124,5 +124,11 @@
"format": "boolean",
"default": true,
"arg": "ignoreRedirects"
+ },
+ "trustedCaCertDirectoryPath": {
+ "doc": "Directory path location to a single PEM formatted certificate file containing one or more trusted CAs. If an absolute directory path is provided that will be used, otherwise if just a directory name is provided, it will look for that directory from within the configured xRunProjectDirectoryName (e.g. /xrun/trustedCaCert ). Note: 1. The file name must not be included in the directory path. 2. Only one single pem file must exist in the directory (multiple CAs can be put in the single file). 3. The file must include a .pem file extension to be found.",
+ "format": "non-empty-string",
+ "default": "trustedCaCert",
+ "arg": "trustedCaCertDirectoryPath"
}
}
\ No newline at end of file
diff --git a/lib/newman.js b/lib/newman.js
index 93cf4d7..5a777c7 100644
--- a/lib/newman.js
+++ b/lib/newman.js
@@ -33,8 +33,8 @@ const newman = function newman() {
////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////
- self.run = async function run(settings, postmanCollection, testResultsJUnitBasePath) {
- const newmanOptions = self.constructPostmanOptions(settings, postmanCollection, testResultsJUnitBasePath)
+ self.run = async function run(settings, postmanCollection, specialNewmanOptions) {
+ const newmanOptions = self.constructPostmanOptions(settings, postmanCollection, specialNewmanOptions)
try {
const summary = await newmanRun(newmanOptions)
@@ -43,14 +43,14 @@ const newman = function newman() {
return collectionResults
} catch (error) {
- throw new Error("Oops, newman run resulted in the following error: " + error.stack)
+ throw new Error(`Oops, newman run resulted in the following error: ${error.stack}`)
}
}
////////////////////////////////////////////////////////////////////////////
//
////////////////////////////////////////////////////////////////////////////
- self.constructPostmanOptions = function constructPostmanOptions(settings, postmanCollection, testResultsJUnitBasePath) {
+ self.constructPostmanOptions = function constructPostmanOptions(settings, postmanCollection, specialNewmanOptions) {
const options = {}
//Set options for newman.run
@@ -62,26 +62,22 @@ const newman = function newman() {
options['timeoutScript'] = settings.timeoutScript
options['ignoreRedirects'] = settings.ignoreRedirects
- //Set reporters
- //JUnit
+ //Set optional options.sslExtraCaCerts
+ if (specialNewmanOptions.trustedCaCertFilePath !== null) {
+ options['sslExtraCaCerts'] = specialNewmanOptions.trustedCaCertFilePath
+ }
+
+
+ //Set JUnit reporter
if (settings.generateJUnitResults === true) {
options['reporters'] = []
options['reporter'] = {}
options['reporters'].push('junit')
- //TODO: Need to have 1 file per test case
- options['reporter']['junit'] = {"export": path.join(testResultsJUnitBasePath, postmanCollection.collection.info.name + '.xml')}
+ //One junit file per test case / collection
+ options['reporter']['junit'] = {"export": path.join(specialNewmanOptions.testResultsJUnitBasePath, postmanCollection.collection.info.name + '.xml')}
}
- //HTML requires a dependency, let's create internally instead
- //options['reporters'].push('html')
- //options['reporter']['html'] = { export : path.join(testResultsBasePath, 'html', collectionName + '.html'), template: path.join(__dirname, 'html-templates', 'template-xrun-collection.hbs') }
-
- //Everything in json is already available in internal summary object
- //options['reporters'].push('json')
- //options['reporter']['json'] = {}
- //options['reporter']['json']['export'] = path.join(testResultsBasePath, 'json', collectionName + '.json')
-
return options
}
@@ -117,9 +113,10 @@ const newman = function newman() {
collectionResults.steps = []
Object.keys(summary.run.executions).forEach(function (index) {
const item = summary.run.executions[index]
+
const postmanRequestUrlObject = convertToCleanObject(item.request.url)
const postmanRequestHeadersObject = convertToCleanObject(item.request.headers)
- const postmanResponseHeadersObject = convertToCleanObject(item.response.headers)
+ const postmanResponseHeadersObject = convertToCleanObject(getItemResponse(item, 'headers'))
const contentTypeRequest = getHeaderValue(postmanRequestHeadersObject, 'Content-Type')
const contentTypeResponse = getHeaderValue(postmanResponseHeadersObject, 'Content-Type')
const postmanAssertions = convertToCleanObject(item.assertions)
@@ -156,15 +153,30 @@ const newman = function newman() {
//response
stepItem.response = {}
- stepItem.response.code = item.response.code
- stepItem.response.status = item.response.status
+ stepItem.response.code = getItemResponse(item, 'code')
+ stepItem.response.status = getItemResponse(item, 'status')
stepItem.response.headers = cleanupPostmanHeaders(postmanResponseHeadersObject)
stepItem.response.headersHtml = escapeAndFormatHtml(convertHeadersToString(stepItem.response.headers), 'properties')
- stepItem.response.body = constructPostmanBody(item.response.stream)
+ stepItem.response.body = constructPostmanBody(getItemResponse(item, 'stream'))
stepItem.response.bodyHtmlEscaped = escapeAndFormatHtml(stepItem.response.body, contentTypeResponse)
- stepItem.response.responseSize = item.response.responseSize
- stepItem.response.responseTime = item.response.responseTime
-
+ stepItem.response.responseSize = getItemResponse(item, 'responseSize')
+ stepItem.response.responseTime = getItemResponse(item, 'responseTime')
+ stepItem.response.failureMessage = null
+
+ //Check for summary.run.failures
+ if (summary.run.failures.length > 0) {
+
+ for (const failure of summary.run.failures) {
+ const error = failure.error
+ const at = failure.at
+ const source = failure.source
+
+ if (at === 'request' && source.name === stepItem.name) {
+ stepItem.response.failureMessage = error.message
+ }
+ }
+ }
+
//assertions
stepItem.assertions = {}
stepItem.assertions = constructAssertionsObject(postmanAssertions)
@@ -177,7 +189,7 @@ const newman = function newman() {
stepItem.stepResult = 'passed'
collectionResults.stepsPassed++
}
-
+
collectionResults.steps.push(stepItem)
})
@@ -211,6 +223,34 @@ const newman = function newman() {
return collectionResults
+
+ function getItemResponse(item, propertyName) {
+ //Supported response properties:
+ // response.code
+ // response.status
+ // response.headers
+ // response.stream
+ // response.responseSize
+ // response.responseTime
+
+ if (item.hasOwnProperty('response')) {
+ if (item.response !== undefined) {
+ if (item.response.hasOwnProperty(propertyName)) {
+ if (item.response[propertyName] !== undefined) {
+ return item.response[propertyName]
+ }
+ }
+ }
+ }
+
+ //Catch all - return nothing
+ if (propertyName === 'headers') {
+ return []
+ } else {
+ return ''
+ }
+
+ }
function escapeAndFormatHtml(inputString, contentType) {
@@ -227,8 +267,8 @@ const newman = function newman() {
const xmlTest = new RegExp('application\/xml', 'i')
if (jsonTest.test(contentType)) {
- outputString = prism.highlight(inputString, prism.languages.json, 'json')
- //outputString = escapeHtml(inputString)
+ const jsonPretty = JSON.stringify(JSON.parse(inputString), null, 2)
+ outputString = prism.highlight(jsonPretty, prism.languages.json, 'json')
} else if (xmlTest.test(contentType)) {
outputString = prism.highlight(inputString, prism.languages.xml, 'xml')
} else if (contentType === "properties") {
diff --git a/lib/runTests.js b/lib/runTests.js
index 5446f1a..003b702 100644
--- a/lib/runTests.js
+++ b/lib/runTests.js
@@ -17,6 +17,7 @@ const htmlResults = require('./htmlResults')
const numberFunctions = require('./numberFunctions')
const asyncLimit = require('./asyncLimit')
const sendSummaryResultsToSlack = require('./sendSummaryResultsToSlack')
+const getTrustedCaCertFilePath = require('./getTrustedCaCertFilePath')
////////////////////////////////////////////////////////////////////////////////
//
@@ -101,7 +102,10 @@ const runTests = function runTests() {
year: "numeric",
timeZoneName: "long"
})
-
+ //Single object to specify newman options
+ const specialNewmanOptions = {}
+ specialNewmanOptions['testResultsJUnitBasePath'] = testResultsJUnitBasePath
+ specialNewmanOptions['trustedCaCertFilePath'] = null
//Set initial testResultSummary properties
testResultSummary['xRunVersion'] = app.getVersion()
@@ -131,12 +135,13 @@ const runTests = function runTests() {
try {
-
+ //Construct trustedCaCertFilePath from settings.trustedCaCertDirectoryPath
+ specialNewmanOptions['trustedCaCertFilePath'] = await getTrustedCaCertFilePath(settings)
//Create tasks array for running postman collections
const runPMCTasks = []
for (const postmanCollection of xRunObject.postmanCollections) {
- runPMCTasks.push(() => newman.run(settings, postmanCollection, testResultsJUnitBasePath))
+ runPMCTasks.push(() => newman.run(settings, postmanCollection, specialNewmanOptions))
}
const results = await asyncLimit(limitConcurrency, runPMCTasks, eventEmitter)
@@ -233,7 +238,6 @@ const runTests = function runTests() {
} catch (error) {
throw error
}
-
}
}
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_DATE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_DATE.postman_collection.json
new file mode 100644
index 0000000..1f87a04
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_DATE.postman_collection.json
@@ -0,0 +1,338 @@
+{
+ "info": {
+ "_postman_id": "7f1f8150-47f5-4dff-9a8d-4c9f322b9baa",
+ "name": "XTEST_DEMO_DATE",
+ "description": "**Objective: Validate the date() function in the following places:**\n\n- response body\n- response header\n- request url\n- request header\n- request body\n \n\n``` javascript\ndate(dateFormat [String], secondsOffset [Number format: +-offsetInSeconds], timeZoneScheme [String]);\n\n```\n\nThis function can be used to dynamically generate a date/time value in any required format. [See here for supported dateFormat specifiers.](https://github.com/samsonjs/strftime/blob/master/Readme.md#supported-specifiers)",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate dynamic date in response body using xtest date() function.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"date10DaysInFutureInFormatYYYYMMDD.date\", date('%Y%m%d', 864000, 'U'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate dynamic date in response header using xtest date() function.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response header",
+ "expectResponseToHaveHeader(\"custom-header-date\", date('%Y%m%d', 864000, 'U'));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date4",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date4"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in url using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"url-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date2?date={{url-date}}",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date2"
+ ],
+ "query": [
+ {
+ "key": "date",
+ "value": "{{url-date}}"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in request header using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"header-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "custom-date-header",
+ "value": "{{header-date}}"
+ }
+ ],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date2",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date2"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in request body using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"body-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n\t\"request-date\": \"{{body-date}}\"\n}"
+ },
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date3",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date3"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ ""
+ ]
+ }
+ }
+ ],
+ "variable": [
+ {
+ "key": "url-date",
+ "value": ""
+ },
+ {
+ "key": "header-date",
+ "value": ""
+ },
+ {
+ "key": "body-date",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json
new file mode 100644
index 0000000..ef458b0
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json
@@ -0,0 +1,56 @@
+{
+ "info": {
+ "_postman_id": "eb6648c7-b48e-413e-b8fa-b1b7c366ed53",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE",
+ "description": "**Objective:** Validate response body property exists but NOT with a given value.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists but NOT with a given value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"XXXX\", \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", false, \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"number.value\", \"12345\", \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"null.value\", undefined, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json
new file mode 100644
index 0000000..06d822f
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "a68792a9-165c-4a50-880d-dae0c94628ab",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH",
+ "description": "Objective: Validate response body property exists but does NOT match against a regular expression.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [RegExp], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists but does NOT match against RegExp literal.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", /$rl3FShupS/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists but does NOT match against RegExp constructor.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", new RegExp(\"$rl3FShupS\"), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json
new file mode 100644
index 0000000..61cac85
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "ad448225-fe79-4ec3-92fb-aefbdc2810cf",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE",
+ "description": "Objective: Validate response body property exists. Ignore property value.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists. Ignore property value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json
new file mode 100644
index 0000000..c05cf75
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "7d896659-7dd6-4569-985b-098af0637cac",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP",
+ "description": "Objective: Validate response property exists and matches against a regular expression.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with expected value using RegExp literal.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", /^rl3FShupS/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with expected value using RegExp constructor.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", new RegExp(\"^rl3FShupS\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json
new file mode 100644
index 0000000..6ecf641
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json
@@ -0,0 +1,56 @@
+{
+ "info": {
+ "_postman_id": "43a638a3-2cd6-4bc1-bb25-d1d6b2409c87",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE",
+ "description": "Objective: Validate response body property exists with expected value and expected data type.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with expected value and expected data type.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"rl3FShupSKpo8tpe07JHKOk1rRrcrvEmtaUMKJfR3hM\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", true);",
+ "expectResponseBodyToHaveProperty(\"number.value\", 12345);",
+ "expectResponseBodyToHaveProperty(\"null.value\", null);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json
new file mode 100644
index 0000000..99c5391
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "ba4ceb85-56a8-4201-a979-4b2b18b23327",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH",
+ "description": "Objective: Validate response body property exists with expectedValue as +-secondsOffset and specialHandling dateAsEpoch.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [Number], specialHandling [String] = \"dateAsEpoch\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with an epoch value of today or 0 secondsOffset (+0 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 0, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus0Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus0Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of tomorrow or +86400 secondsOffset (+1 day).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 86400, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus1Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus1Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of yesterday or -86400 secondsOffset (-1 day).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", -86400, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochMinus1Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochMinus1Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of one week from today or 604800 secondsOffset (+7 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 604800, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus7Days",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus7Days"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of one week ago from today or -604800 secondsOffset (-7 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", -604800, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochMinus7Days",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochMinus7Days"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json
new file mode 100644
index 0000000..34d62c7
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "0061c544-85cd-4e55-95a9-ccc9268dcc74",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH",
+ "description": "Objective: Validate response body property exists with expectedValue in string format \"YYYY-MM-DD\" and specialHandling dateAsEpoch.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String], specialHandling [String] = \"dateAsEpoch\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response property exists with an epoch value of 2020-10-31.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", \"2020-10-31\", 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochHardCoded20201031",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochHardCoded20201031"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response property exists with an epoch value of 2020-10-31-07:00.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", \"2020-10-31-07:00\", 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochHardCoded20201031",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochHardCoded20201031"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json
new file mode 100644
index 0000000..4f90b59
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json
@@ -0,0 +1,100 @@
+{
+ "info": {
+ "_postman_id": "9c35fe17-81a8-4b12-8159-7beb15ce004f",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1",
+ "description": "Objective: Validate a response body with an unordered array of objects.\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body with an unordered array of objects.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"wKg_SyYvyrjEvC0ZqWAE3ROKIr0fPNj8-0-QkMMMgJo\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"blDDAZwefeule19fwjZ1LmytYwqnnn6fs0RHIDGEvxY\"},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"bXXVt3_SpfyIUNSPFBu0crJGDCRJG388z8iZ9Qlt78Q\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json
new file mode 100644
index 0000000..0feb5e5
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json
@@ -0,0 +1,207 @@
+{
+ "info": {
+ "_postman_id": "2f5d4102-f2d1-4215-9b7b-bfb7cb92b631",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2",
+ "description": "Objective: Validate a response body with an unordered array of objects, with specialHandling \"setAsCollectionVariable\".\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set unordered array account ids as collection variables.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-KkG\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-wKg\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-blD\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-bXX\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate account ids using collection variables from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-KkG\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-wKg\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-blD\")},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-bXX\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "account-id-KkG",
+ "value": ""
+ },
+ {
+ "key": "account-id-wKg",
+ "value": ""
+ },
+ {
+ "key": "account-id-blD",
+ "value": ""
+ },
+ {
+ "key": "account-id-bXX",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json
new file mode 100644
index 0000000..614d1ec
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json
@@ -0,0 +1,59 @@
+{
+ "info": {
+ "_postman_id": "b99e7713-ce09-4989-9b2a-8211672a0b26",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3",
+ "description": "Objective: Validate a response body with an unordered array of objects, with specialHandling \"notThisExpectedKey\" and \"notThisExpectedValue\".\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body with an unordered array of objects, with specialHandling \"notThisExpectedKey\" and \"notThisExpectedValue\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"description.notValid\", expectedValue: null, specialHandling: \"notThisExpectedKey\"},",
+ " {pathToProperty: \"description\", expectedValue: \"wrong description\", specialHandling: \"notThisExpectedValue\"},",
+ " {pathToProperty: \"category\", expectedValue: /WRONG CATEGORY/, specialHandling: \"notThisExpectedValue\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 4.73, specialHandling: \"notThisExpectedValue\"}",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json
new file mode 100644
index 0000000..16879f5
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json
@@ -0,0 +1,72 @@
+{
+ "info": {
+ "_postman_id": "8635f099-7597-45e8-8ce3-159098c8fa63",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE",
+ "description": "Objective: Validate a response body with an unordered array that is of simple type (i.e. simple list of items).\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Simple Array]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a simple response body with an unordered array.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"items.alpha\", [",
+ " \"d\",",
+ " \"f\",",
+ " \"b\",",
+ " \"e\",",
+ " \"a\",",
+ " \"c\"",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"items.numeric\", [",
+ " 3,",
+ " 5,",
+ " 9,",
+ " 1,",
+ " 10,",
+ " 6,",
+ " 8,",
+ " 4,",
+ " 7,",
+ " 2",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArraySimple",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArraySimple"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json
new file mode 100644
index 0000000..cb96fbd
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "724d22bf-877d-4c0e-a409-a64db567a672",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY",
+ "description": "Objective: Validate response body property does NOT exist (In this context, notThisExpectedKey is the jsonPath).\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], null, specialHandling [String] = \"notThisExpectedKey\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body property does NOT exist.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.notValid\", null, \"notThisExpectedKey\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json
new file mode 100644
index 0000000..bc77022
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json
@@ -0,0 +1,179 @@
+{
+ "info": {
+ "_postman_id": "48200b20-bcc2-4418-8465-e58ce2549a09",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER",
+ "description": "Objective: Validate response status code as number.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [Number]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "expectedValue = 200",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(200);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 204",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(204);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 404",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(404);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 500",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(500);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json
new file mode 100644
index 0000000..55e4b3e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "5473ac54-d952-4b36-9c7d-63ade1c075f4",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP",
+ "description": "Objective: Validate response status code as regular expression.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "status code 200 - RegExp literal = /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 204 - RegExp literal = /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 404 - RegExp literal = /^4/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^4/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 500 - RegExp literal = /^5/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^5/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 200 - RegExp constructor = new RegExp('^2')",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(new RegExp('^2'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json
new file mode 100644
index 0000000..50fb079
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json
@@ -0,0 +1,179 @@
+{
+ "info": {
+ "_postman_id": "ff0279c3-4950-4838-bd1d-9b3021c8f8b8",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER",
+ "description": "Objective: Validate response status code is NOT a given number.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [Number], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "expectedValue NOT 201",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(201, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 205",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(205, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 405",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(405, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 501",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(501, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json
new file mode 100644
index 0000000..764e68b
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "e119127d-cba3-4cfb-8871-72651a3cfe3b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP",
+ "description": "Objective: Validate response status code is NOT a given regular expression.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [RegExp], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "status code 200 - RegExp literal NOT /^4/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^4/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 204 - RegExp literal NOT /^1/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^1/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 404 - RegExp literal NOT /^5/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^5/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 500 - RegExp literal NOT /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 200 - RegExp constructor NOT new RegExp('1$')",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(new RegExp('1$'), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json
new file mode 100644
index 0000000..1a173fa
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "fd307d7a-23e2-4f2a-93ba-d5f505043f1c",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE",
+ "description": "Objective: Validate response header key exists. Ignore response header value.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists. Ignore value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
new file mode 100644
index 0000000..a92c4b9
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "02a4d774-61bc-4a25-849b-ee1f66e0ac24",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE",
+ "description": "Objective: Validate response header key as string. Validate response header value as regular expression.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with RegExp literal value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", /the CUSTOM hEadEr VAL/i);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with RegExp constructor value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", new RegExp('the CUSTOM hEadEr VAL', 'i'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json
new file mode 100644
index 0000000..7f82d0e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "3f0af2a8-2014-4d54-8e0d-23d12a108811",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate response header key and header value as strings.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with value \"This is the custom header value\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
new file mode 100644
index 0000000..8333da1
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "b06fcd92-ef36-4e8a-993a-f82e59adc60d",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE",
+ "description": "Objective: Validate response header key as string. Validate response header value does NOT match regular expression.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [RegExp], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT match RegExp literal value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", /the CUSTOM hEadEr VAL/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT match RegExp constructor value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", new RegExp('the CUSTOM hEadEr VAL', 'g'), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory2/invalid-json-type-file.json5 b/lib/unit-tests/test-data/test-project6/directory2/invalid-json-type-file.json5
new file mode 100644
index 0000000..e69de29
diff --git a/lib/unit-tests/test-data/test-project6/directory2/text-type-file.txt b/lib/unit-tests/test-data/test-project6/directory2/text-type-file.txt
new file mode 100644
index 0000000..e69de29
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json
new file mode 100644
index 0000000..b623c2b
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "c2d57ce7-63d5-4ced-b4c1-a1f55220356c",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER",
+ "description": "Objective: Validate a response header key does NOT exist.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], null, specialHandling [String] = \"notThisExpectedKey\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Some-Header\" does NOT exist.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"some-header\", null, \"notThisExpectedKey\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json
new file mode 100644
index 0000000..3401e98
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "923d2734-4585-461f-98da-bbb485b59b6b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate for a given response header key that the header value does NOT match.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT have value \"This is the custom header value that will not match\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value that will not match\", \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..144011e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,101 @@
+{
+ "info": {
+ "_postman_id": "7c9f0df6-5ff4-4a58-9ab3-22d3973751db",
+ "name": "XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set a response header value as an collection variable.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set response header \"Custom-Header\" value as collection variable.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"custom-header-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" using value of collection variable from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", pm.collectionVariables.get(\"custom-header-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "custom-header-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..ea8300c
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,119 @@
+{
+ "info": {
+ "_postman_id": "637fe7a0-e5be-4723-924e-64f0f5cc0e17",
+ "name": "XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set a response body property as an collection variable.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set response property values as collection variables.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"string-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", \"boolean-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"number.value\", \"number-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"null.value\", \"null-value-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response property values using collection variables from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", pm.collectionVariables.get(\"string-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", pm.collectionVariables.get(\"boolean-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"number.value\", pm.collectionVariables.get(\"number-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"null.value\", pm.collectionVariables.get(\"null-value-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "string-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "boolean-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "number-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "null-value-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..a63a06e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,101 @@
+{
+ "info": {
+ "_postman_id": "9544ae2e-1594-41b4-bdc2-a62dbac0638e",
+ "name": "XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set the response status code as an collection variable.\n\n``` javascript\nexpectResponseStatusCodeToBe(collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set status code as collection variable.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(\"status-code-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate status code using collection variable from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(pm.collectionVariables.get(\"status-code-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "status-code-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML1.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML1.postman_collection.json
new file mode 100644
index 0000000..b4839d8
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML1.postman_collection.json
@@ -0,0 +1,94 @@
+{
+ "info": {
+ "_postman_id": "b0acd236-d038-4d04-8277-5cb1b4d0c153",
+ "name": "XTEST_DEMO_XML1",
+ "description": "Objective: XML responses are internally converted into JSON and can be used with any of the xtest functions. Validate an XML response using the function:\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null])\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate xml response using expectResponseBodyToHaveProperty().",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.id\", \"peZgYNd9BPtZtkxILwOSgxzyslXa5R8fHNy0LVyKk3U\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiCustomerId\", \"c0a8e426abdsferlklklkhshsl645c31\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiId\", \"DI1805\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.description\", \"Description - SNCO Uniform Loan\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.nickName\", \"Description - SNCO Uniform Loan\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayAccountNumber\", \"*1001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.hostValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.displayValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.pfmValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.rawHostValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.category\", \"DEPOSIT\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountType\", \"CHECKING\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.type\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.rawType\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.description\", \"Checking\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.ownershipType\", \"PRIMARY\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.balance.currentBalance.amount\", \"1234.4\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.balance.availableBalance.amount\", \"1123.41\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatus\", \"OPEN\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.open\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.closed\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.negativeBalance\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.delinquent\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.inCollection\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.overLimit\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.writtenOff\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.creditBalance\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.paymentCoupon\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.retirementPlan\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.retPlanOwnedByDeceased\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.summary\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.transferFrom\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.transferTo\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.isHistoryEnabled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.isHistoryEntitled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.enabled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountHidden\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.memberNumber\", \"CBS2XUSR012\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.ccAccountId\", \"330001001^1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatusInt\", \"0\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.diAccountType\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.dcBillPayAccountNumber\", \"330001001\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/xml1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "xml1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML2.postman_collection.json b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML2.postman_collection.json
new file mode 100644
index 0000000..3deda6d
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/directory3/XTEST_DEMO_XML2.postman_collection.json
@@ -0,0 +1,148 @@
+{
+ "info": {
+ "_postman_id": "cfba995b-b05e-47df-bae7-20f7c0e834ea",
+ "name": "XTEST_DEMO_XML2",
+ "description": "Objective: XML responses are internally converted into JSON and can be used with any of the xtest functions. Validate an XML response using the function:\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects])\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate xml response using expectResponseBodyToHaveUnorderedArray().",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"Accounts.account\", [",
+ " {pathToProperty: \"id\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"fiCustomerId\", expectedValue: \"c0a8e326004df0c64b6367a51be34400\"},",
+ " {pathToProperty: \"fiId\", expectedValue: \"DI1008\"},",
+ " {pathToProperty: \"description\", expectedValue: \"NHIST 0 Account - History not supported\"},",
+ " {pathToProperty: \"nickName\", expectedValue: \"NHIST 0 Account - History not supported\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.displayValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.pfmValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.rawHostValue\", expectedValue: \"7436283221^GARBAGE\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"fiAccountType.type\", expectedValue: \"1\"},",
+ " {pathToProperty: \"fiAccountType.rawType\", expectedValue: \"1\"},",
+ " {pathToProperty: \"fiAccountType.description\", expectedValue: \"Checking\"},",
+ " {pathToProperty: \"ownershipType\", expectedValue: \"PRIMARY\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: \"84.73\"},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: \"38.21\"},",
+ " {pathToProperty: \"asOfDate\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"},",
+ " {pathToProperty: \"accountStatuses.open\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountStatuses.closed\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.negativeBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.delinquent\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.inCollection\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.overLimit\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.writtenOff\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.creditBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.paymentCoupon\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retirementPlan\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retPlanOwnedByDeceased\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.summary\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferFrom\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferTo\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEnabled\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEntitled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"interestRate\", expectedValue: \"0.004\"},",
+ " {pathToProperty: \"interestYearToDate.amount\", expectedValue: \"56.9\"},",
+ " {pathToProperty: \"interestPriorYearToDate.amount\", expectedValue: \"250.9\"},",
+ " {pathToProperty: \"enabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountHidden\", expectedValue: \"false\"},",
+ " {pathToProperty: \"memberNumber\", expectedValue: \"AUTOCBS20001\"},",
+ " {pathToProperty: \"ccAccountId\", expectedValue: \"7436283221^1\"},",
+ " {pathToProperty: \"accountStatusInt\", expectedValue: \"0\"},",
+ " {pathToProperty: \"diAccountType\", expectedValue: \"1\"},",
+ " {pathToProperty: \"dcBillPayAccountNumber\", expectedValue: \"7436283221\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"Accounts.account\", [",
+ " {pathToProperty: \"id\", expectedValue: \"J8fhcO2UzfqChL84fZe3odg6PQbwUalR5ncGh7cs1io\"},",
+ " {pathToProperty: \"fiCustomerId\", expectedValue: \"c0a8e326004df0c64b6367a51be34400\"},",
+ " {pathToProperty: \"fiId\", expectedValue: \"DI1008\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Unknown Account Type DITYP -1\"},",
+ " {pathToProperty: \"nickName\", expectedValue: \"Unknown Account Type DITYP -1\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0001\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.displayValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.pfmValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.rawHostValue\", expectedValue: \"7362811980001^GARBAGE\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"UNKNOWN\"},",
+ " {pathToProperty: \"fiAccountType.type\", expectedValue: \"7321\"},",
+ " {pathToProperty: \"fiAccountType.rawType\", expectedValue: \"7321\"},",
+ " {pathToProperty: \"fiAccountType.description\", expectedValue: \"UNKNOWN\"},",
+ " {pathToProperty: \"ownershipType\", expectedValue: \"PRIMARY\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: \"500.0\"},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: \"500.0\"},",
+ " {pathToProperty: \"asOfDate\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"},",
+ " {pathToProperty: \"accountStatuses.open\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountStatuses.closed\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.negativeBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.delinquent\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.inCollection\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.overLimit\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.writtenOff\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.creditBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.paymentCoupon\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retirementPlan\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retPlanOwnedByDeceased\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.summary\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferFrom\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferTo\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEnabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEntitled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"interestRate\", expectedValue: \"0.006\"},",
+ " {pathToProperty: \"interestYearToDate.amount\", expectedValue: \"56.9\"},",
+ " {pathToProperty: \"interestPriorYearToDate.amount\", expectedValue: \"250.9\"},",
+ " {pathToProperty: \"enabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountHidden\", expectedValue: \"false\"},",
+ " {pathToProperty: \"memberNumber\", expectedValue: \"AUTOCBS20001\"},",
+ " {pathToProperty: \"ccAccountId\", expectedValue: \"7362811980001^-1\"},",
+ " {pathToProperty: \"accountStatusInt\", expectedValue: \"0\"},",
+ " {pathToProperty: \"diAccountType\", expectedValue: \"-1\"},",
+ " {pathToProperty: \"dcBillPayAccountNumber\", expectedValue: \"7362811980001\"}",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/xml2",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "xml2"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json b/lib/unit-tests/test-data/test-project6/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json
new file mode 100644
index 0000000..3401e98
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "923d2734-4585-461f-98da-bbb485b59b6b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate for a given response header key that the header value does NOT match.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT have value \"This is the custom header value that will not match\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value that will not match\", \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/xrun/dev1.bulk b/lib/unit-tests/test-data/test-project6/xrun/dev1.bulk
new file mode 100644
index 0000000..677072e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/xrun/dev1.bulk
@@ -0,0 +1,2 @@
+var1:dev1-var1
+var2:dev1-var2
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/xrun/exclude-list.json b/lib/unit-tests/test-data/test-project6/xrun/exclude-list.json
new file mode 100644
index 0000000..79c1c15
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/xrun/exclude-list.json
@@ -0,0 +1,5 @@
+[
+ "directory2",
+ "empty-directory",
+ "invalid-postman-file"
+]
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/xrun/qat1.bulk b/lib/unit-tests/test-data/test-project6/xrun/qat1.bulk
new file mode 100644
index 0000000..2570831
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/xrun/qat1.bulk
@@ -0,0 +1,2 @@
+var1:qat1-var1
+var2:qat1-var2
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project6/xrun/trustedCaCert/successfulCaCert.pem b/lib/unit-tests/test-data/test-project6/xrun/trustedCaCert/successfulCaCert.pem
new file mode 100644
index 0000000..67d94dc
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project6/xrun/trustedCaCert/successfulCaCert.pem
@@ -0,0 +1 @@
+success!
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_DATE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_DATE.postman_collection.json
new file mode 100644
index 0000000..1f87a04
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_DATE.postman_collection.json
@@ -0,0 +1,338 @@
+{
+ "info": {
+ "_postman_id": "7f1f8150-47f5-4dff-9a8d-4c9f322b9baa",
+ "name": "XTEST_DEMO_DATE",
+ "description": "**Objective: Validate the date() function in the following places:**\n\n- response body\n- response header\n- request url\n- request header\n- request body\n \n\n``` javascript\ndate(dateFormat [String], secondsOffset [Number format: +-offsetInSeconds], timeZoneScheme [String]);\n\n```\n\nThis function can be used to dynamically generate a date/time value in any required format. [See here for supported dateFormat specifiers.](https://github.com/samsonjs/strftime/blob/master/Readme.md#supported-specifiers)",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate dynamic date in response body using xtest date() function.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"date10DaysInFutureInFormatYYYYMMDD.date\", date('%Y%m%d', 864000, 'U'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate dynamic date in response header using xtest date() function.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response header",
+ "expectResponseToHaveHeader(\"custom-header-date\", date('%Y%m%d', 864000, 'U'));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date4",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date4"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in url using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"url-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date2?date={{url-date}}",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date2"
+ ],
+ "query": [
+ {
+ "key": "date",
+ "value": "{{url-date}}"
+ }
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in request header using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"header-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [
+ {
+ "key": "custom-date-header",
+ "value": "{{header-date}}"
+ }
+ ],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date2",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date2"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Send dynamic date in request body using xtest date() function (see \"Pre-request Script\").",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"status\", \"ok\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ },
+ {
+ "listen": "prerequest",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Set collection variable",
+ "pm.collectionVariables.set(\"body-date\", date('%Y-%m-%d', 0, 'U'));"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "POST",
+ "header": [
+ {
+ "key": "Content-Type",
+ "value": "application/json"
+ }
+ ],
+ "body": {
+ "mode": "raw",
+ "raw": "{\n\t\"request-date\": \"{{body-date}}\"\n}"
+ },
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/date3",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "date3"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));"
+ ]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "type": "text/javascript",
+ "exec": [
+ ""
+ ]
+ }
+ }
+ ],
+ "variable": [
+ {
+ "key": "url-date",
+ "value": ""
+ },
+ {
+ "key": "header-date",
+ "value": ""
+ },
+ {
+ "key": "body-date",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json
new file mode 100644
index 0000000..ef458b0
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE.postman_collection.json
@@ -0,0 +1,56 @@
+{
+ "info": {
+ "_postman_id": "eb6648c7-b48e-413e-b8fa-b1b7c366ed53",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_GIVEN_VALUE",
+ "description": "**Objective:** Validate response body property exists but NOT with a given value.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists but NOT with a given value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"XXXX\", \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", false, \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"number.value\", \"12345\", \"notThisExpectedValue\");",
+ "expectResponseBodyToHaveProperty(\"null.value\", undefined, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json
new file mode 100644
index 0000000..06d822f
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "a68792a9-165c-4a50-880d-dae0c94628ab",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_BUT_NOT_WITH_REGEXP_MATCH",
+ "description": "Objective: Validate response body property exists but does NOT match against a regular expression.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [RegExp], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists but does NOT match against RegExp literal.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", /$rl3FShupS/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists but does NOT match against RegExp constructor.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", new RegExp(\"$rl3FShupS\"), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json
new file mode 100644
index 0000000..61cac85
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "ad448225-fe79-4ec3-92fb-aefbdc2810cf",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_IGNORE_VALUE",
+ "description": "Objective: Validate response body property exists. Ignore property value.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists. Ignore property value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json
new file mode 100644
index 0000000..c05cf75
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "7d896659-7dd6-4569-985b-098af0637cac",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_REGEXP",
+ "description": "Objective: Validate response property exists and matches against a regular expression.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with expected value using RegExp literal.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", /^rl3FShupS/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with expected value using RegExp constructor.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.value\", new RegExp(\"^rl3FShupS\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json
new file mode 100644
index 0000000..6ecf641
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE.postman_collection.json
@@ -0,0 +1,56 @@
+{
+ "info": {
+ "_postman_id": "43a638a3-2cd6-4bc1-bb25-d1d6b2409c87",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE",
+ "description": "Objective: Validate response body property exists with expected value and expected data type.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with expected value and expected data type.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"rl3FShupSKpo8tpe07JHKOk1rRrcrvEmtaUMKJfR3hM\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", true);",
+ "expectResponseBodyToHaveProperty(\"number.value\", 12345);",
+ "expectResponseBodyToHaveProperty(\"null.value\", null);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json
new file mode 100644
index 0000000..99c5391
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "ba4ceb85-56a8-4201-a979-4b2b18b23327",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_NUMBER_DATE_AS_EPOCH",
+ "description": "Objective: Validate response body property exists with expectedValue as +-secondsOffset and specialHandling dateAsEpoch.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [Number], specialHandling [String] = \"dateAsEpoch\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response body property exists with an epoch value of today or 0 secondsOffset (+0 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 0, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus0Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus0Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of tomorrow or +86400 secondsOffset (+1 day).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 86400, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus1Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus1Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of yesterday or -86400 secondsOffset (-1 day).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", -86400, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochMinus1Day",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochMinus1Day"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of one week from today or 604800 secondsOffset (+7 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", 604800, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochPlus7Days",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochPlus7Days"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response body property exists with an epoch value of one week ago from today or -604800 secondsOffset (-7 days).",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", -604800, 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochMinus7Days",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochMinus7Days"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json
new file mode 100644
index 0000000..34d62c7
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "0061c544-85cd-4e55-95a9-ccc9268dcc74",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_PROPERTY_VALUE_STRING_DATE_AS_EPOCH",
+ "description": "Objective: Validate response body property exists with expectedValue in string format \"YYYY-MM-DD\" and specialHandling dateAsEpoch.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String], specialHandling [String] = \"dateAsEpoch\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response property exists with an epoch value of 2020-10-31.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", \"2020-10-31\", 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochHardCoded20201031",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochHardCoded20201031"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response property exists with an epoch value of 2020-10-31-07:00.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"epoch.date\", \"2020-10-31-07:00\", 'dateAsEpoch');",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonPropertyEpochHardCoded20201031",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonPropertyEpochHardCoded20201031"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json
new file mode 100644
index 0000000..4f90b59
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1.postman_collection.json
@@ -0,0 +1,100 @@
+{
+ "info": {
+ "_postman_id": "9c35fe17-81a8-4b12-8159-7beb15ce004f",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_1",
+ "description": "Objective: Validate a response body with an unordered array of objects.\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body with an unordered array of objects.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"wKg_SyYvyrjEvC0ZqWAE3ROKIr0fPNj8-0-QkMMMgJo\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"blDDAZwefeule19fwjZ1LmytYwqnnn6fs0RHIDGEvxY\"},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"bXXVt3_SpfyIUNSPFBu0crJGDCRJG388z8iZ9Qlt78Q\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json
new file mode 100644
index 0000000..0feb5e5
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2.postman_collection.json
@@ -0,0 +1,207 @@
+{
+ "info": {
+ "_postman_id": "2f5d4102-f2d1-4215-9b7b-bfb7cb92b631",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_2",
+ "description": "Objective: Validate a response body with an unordered array of objects, with specialHandling \"setAsCollectionVariable\".\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set unordered array account ids as collection variables.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-KkG\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-wKg\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-blD\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"account-id-bXX\", specialHandling: \"setAsCollectionVariable\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate account ids using collection variables from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-KkG\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Checking Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 1184.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 1138.21},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-wKg\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Savings Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0002\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"SAVINGS\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 10002.73},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 10001.73},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-blD\")},",
+ " {pathToProperty: \"description\", expectedValue: \"401K Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0024\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000024\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"RETIREMENT_401_K\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 50000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: pm.collectionVariables.get(\"account-id-bXX\")},",
+ " {pathToProperty: \"description\", expectedValue: \"Certificate of Deposit Account\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0025\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"9900000025\"},",
+ " {pathToProperty: \"category\", expectedValue: \"INVESTMENT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CERT_OF_DEPOSIT\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: 15000},",
+ " {pathToProperty: \"asOfDate\", expectedValue: -86400, specialHandling: \"dateAsEpoch\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\", specialHandling: undefined},",
+ " {pathToProperty: \"interestRate\", expectedValue: 0.006},",
+ " {pathToProperty: \"maturityDate\", expectedValue: \"2040-01-30\", specialHandling: \"dateAsEpoch\"},",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "account-id-KkG",
+ "value": ""
+ },
+ {
+ "key": "account-id-wKg",
+ "value": ""
+ },
+ {
+ "key": "account-id-blD",
+ "value": ""
+ },
+ {
+ "key": "account-id-bXX",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json
new file mode 100644
index 0000000..614d1ec
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3.postman_collection.json
@@ -0,0 +1,59 @@
+{
+ "info": {
+ "_postman_id": "b99e7713-ce09-4989-9b2a-8211672a0b26",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_OF_OBJECTS_3",
+ "description": "Objective: Validate a response body with an unordered array of objects, with specialHandling \"notThisExpectedKey\" and \"notThisExpectedValue\".\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body with an unordered array of objects, with specialHandling \"notThisExpectedKey\" and \"notThisExpectedValue\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"account\", [",
+ " {pathToProperty: \"id.value\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"description.notValid\", expectedValue: null, specialHandling: \"notThisExpectedKey\"},",
+ " {pathToProperty: \"description\", expectedValue: \"wrong description\", specialHandling: \"notThisExpectedValue\"},",
+ " {pathToProperty: \"category\", expectedValue: /WRONG CATEGORY/, specialHandling: \"notThisExpectedValue\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: 4.73, specialHandling: \"notThisExpectedValue\"}",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArrayOfAccounts1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArrayOfAccounts1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json
new file mode 100644
index 0000000..16879f5
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory1/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE.postman_collection.json
@@ -0,0 +1,72 @@
+{
+ "info": {
+ "_postman_id": "8635f099-7597-45e8-8ce3-159098c8fa63",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_HAVE_UNORDERED_ARRAY_SIMPLE",
+ "description": "Objective: Validate a response body with an unordered array that is of simple type (i.e. simple list of items).\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Simple Array]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a simple response body with an unordered array.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"items.alpha\", [",
+ " \"d\",",
+ " \"f\",",
+ " \"b\",",
+ " \"e\",",
+ " \"a\",",
+ " \"c\"",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"items.numeric\", [",
+ " 3,",
+ " 5,",
+ " 9,",
+ " 1,",
+ " 10,",
+ " 6,",
+ " 8,",
+ " 4,",
+ " 7,",
+ " 2",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonArraySimple",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonArraySimple"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json
new file mode 100644
index 0000000..cb96fbd
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "724d22bf-877d-4c0e-a409-a64db567a672",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_BODY_TO_NOT_HAVE_RESPONSE_PROPERTY",
+ "description": "Objective: Validate response body property does NOT exist (In this context, notThisExpectedKey is the jsonPath).\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], null, specialHandling [String] = \"notThisExpectedKey\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate a response body property does NOT exist.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, false);",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"id.notValid\", null, \"notThisExpectedKey\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveSingleJsonProperty",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveSingleJsonProperty"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json
new file mode 100644
index 0000000..bc77022
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER.postman_collection.json
@@ -0,0 +1,179 @@
+{
+ "info": {
+ "_postman_id": "48200b20-bcc2-4418-8465-e58ce2549a09",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_NUMBER",
+ "description": "Objective: Validate response status code as number.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [Number]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "expectedValue = 200",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(200);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 204",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(204);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 404",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(404);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue = 500",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(500);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json
new file mode 100644
index 0000000..55e4b3e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "5473ac54-d952-4b36-9c7d-63ade1c075f4",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_BE_REGEXP",
+ "description": "Objective: Validate response status code as regular expression.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "status code 200 - RegExp literal = /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 204 - RegExp literal = /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 404 - RegExp literal = /^4/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^4/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 500 - RegExp literal = /^5/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^5/);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 200 - RegExp constructor = new RegExp('^2')",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(new RegExp('^2'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json
new file mode 100644
index 0000000..50fb079
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER.postman_collection.json
@@ -0,0 +1,179 @@
+{
+ "info": {
+ "_postman_id": "ff0279c3-4950-4838-bd1d-9b3021c8f8b8",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_NUMBER",
+ "description": "Objective: Validate response status code is NOT a given number.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [Number], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "expectedValue NOT 201",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(201, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 205",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(205, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 405",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(405, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "expectedValue NOT 501",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(501, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json
new file mode 100644
index 0000000..764e68b
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP.postman_collection.json
@@ -0,0 +1,221 @@
+{
+ "info": {
+ "_postman_id": "e119127d-cba3-4cfb-8871-72651a3cfe3b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_STATUS_CODE_TO_NOT_BE_THIS_REGEXP",
+ "description": "Objective: Validate response status code is NOT a given regular expression.\n\n``` javascript\nexpectResponseStatusCodeToBe(expectedValue [RegExp], specialHandling [String] = \"notThisExpectedValue\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "status code 200 - RegExp literal NOT /^4/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^4/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 204 - RegExp literal NOT /^1/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^1/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode204",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode204"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 404 - RegExp literal NOT /^5/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^5/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode404",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode404"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 500 - RegExp literal NOT /^2/",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(/^2/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode500",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode500"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "status code 200 - RegExp constructor NOT new RegExp('1$')",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(new RegExp('1$'), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json
new file mode 100644
index 0000000..1a173fa
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "fd307d7a-23e2-4f2a-93ba-d5f505043f1c",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_IGNORE_VALUE",
+ "description": "Objective: Validate response header key exists. Ignore response header value.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists. Ignore value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
new file mode 100644
index 0000000..a92c4b9
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "02a4d774-61bc-4a25-849b-ee1f66e0ac24",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_REGEXP_VALUE",
+ "description": "Objective: Validate response header key as string. Validate response header value as regular expression.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [RegExp]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with RegExp literal value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", /the CUSTOM hEadEr VAL/i);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with RegExp constructor value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", new RegExp('the CUSTOM hEadEr VAL', 'i'));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json
new file mode 100644
index 0000000..7f82d0e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "3f0af2a8-2014-4d54-8e0d-23d12a108811",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate response header key and header value as strings.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String]);\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists with value \"This is the custom header value\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
new file mode 100644
index 0000000..8333da1
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory2/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE.postman_collection.json
@@ -0,0 +1,95 @@
+{
+ "info": {
+ "_postman_id": "b06fcd92-ef36-4e8a-993a-f82e59adc60d",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_REGEXP_VALUE",
+ "description": "Objective: Validate response header key as string. Validate response header value does NOT match regular expression.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [RegExp], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT match RegExp literal value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", /the CUSTOM hEadEr VAL/, \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT match RegExp constructor value.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", new RegExp('the CUSTOM hEadEr VAL', 'g'), \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory2/invalid-json-type-file.json5 b/lib/unit-tests/test-data/test-project7/directory2/invalid-json-type-file.json5
new file mode 100644
index 0000000..e69de29
diff --git a/lib/unit-tests/test-data/test-project7/directory2/text-type-file.txt b/lib/unit-tests/test-data/test-project7/directory2/text-type-file.txt
new file mode 100644
index 0000000..e69de29
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json
new file mode 100644
index 0000000..b623c2b
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "c2d57ce7-63d5-4ced-b4c1-a1f55220356c",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER",
+ "description": "Objective: Validate a response header key does NOT exist.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], null, specialHandling [String] = \"notThisExpectedKey\");\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Some-Header\" does NOT exist.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"some-header\", null, \"notThisExpectedKey\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json
new file mode 100644
index 0000000..3401e98
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_collection.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "923d2734-4585-461f-98da-bbb485b59b6b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate for a given response header key that the header value does NOT match.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT have value \"This is the custom header value that will not match\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value that will not match\", \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..144011e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,101 @@
+{
+ "info": {
+ "_postman_id": "7c9f0df6-5ff4-4a58-9ab3-22d3973751db",
+ "name": "XTEST_DEMO_HEADER_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set a response header value as an collection variable.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set response header \"Custom-Header\" value as collection variable.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"custom-header-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response header key \"Custom-Header\" using value of collection variable from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", pm.collectionVariables.get(\"custom-header-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "custom-header-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..ea8300c
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,119 @@
+{
+ "info": {
+ "_postman_id": "637fe7a0-e5be-4723-924e-64f0f5cc0e17",
+ "name": "XTEST_DEMO_RESPONSE_PROPERTY_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set a response body property as an collection variable.\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set response property values as collection variables.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", \"string-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", \"boolean-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"number.value\", \"number-value-col-var-key\", \"setAsCollectionVariable\");",
+ "expectResponseBodyToHaveProperty(\"null.value\", \"null-value-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate response property values using collection variables from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"string.value\", pm.collectionVariables.get(\"string-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"boolean.value\", pm.collectionVariables.get(\"boolean-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"number.value\", pm.collectionVariables.get(\"number-value-col-var-key\"));",
+ "expectResponseBodyToHaveProperty(\"null.value\", pm.collectionVariables.get(\"null-value-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveJsonPropertiesWithAllDataTypes",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveJsonPropertiesWithAllDataTypes"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "string-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "boolean-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "number-value-col-var-key",
+ "value": ""
+ },
+ {
+ "key": "null-value-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
new file mode 100644
index 0000000..a63a06e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE.postman_collection.json
@@ -0,0 +1,101 @@
+{
+ "info": {
+ "_postman_id": "9544ae2e-1594-41b4-bdc2-a62dbac0638e",
+ "name": "XTEST_DEMO_STATUS_CODE_SPECIAL_HANDLING_SET_AS_COLLECTION_VARIABLE",
+ "description": "Objective: Set the response status code as an collection variable.\n\n``` javascript\nexpectResponseStatusCodeToBe(collectionVariableKey [String], specialHandling [String] = \"setAsCollectionVariable\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Set status code as collection variable.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(\"status-code-col-var-key\", \"setAsCollectionVariable\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ },
+ {
+ "name": "Validate status code using collection variable from above request.",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response status code",
+ "expectResponseStatusCodeToBe(pm.collectionVariables.get(\"status-code-col-var-key\"));",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseStatusCode200",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseStatusCode200"
+ ]
+ }
+ },
+ "response": []
+ }
+ ],
+ "variable": [
+ {
+ "key": "status-code-col-var-key",
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML1.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML1.postman_collection.json
new file mode 100644
index 0000000..b4839d8
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML1.postman_collection.json
@@ -0,0 +1,94 @@
+{
+ "info": {
+ "_postman_id": "b0acd236-d038-4d04-8277-5cb1b4d0c153",
+ "name": "XTEST_DEMO_XML1",
+ "description": "Objective: XML responses are internally converted into JSON and can be used with any of the xtest functions. Validate an XML response using the function:\n\n``` javascript\nexpectResponseBodyToHaveProperty(jsonPath [String], expectedValue [String, Boolean, Number, or null])\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate xml response using expectResponseBodyToHaveProperty().",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.id\", \"peZgYNd9BPtZtkxILwOSgxzyslXa5R8fHNy0LVyKk3U\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiCustomerId\", \"c0a8e426abdsferlklklkhshsl645c31\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiId\", \"DI1805\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.description\", \"Description - SNCO Uniform Loan\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.nickName\", \"Description - SNCO Uniform Loan\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayAccountNumber\", \"*1001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.hostValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.displayValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.pfmValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountNumber.rawHostValue\", \"330001001\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.category\", \"DEPOSIT\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountType\", \"CHECKING\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.type\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.rawType\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.fiAccountType.description\", \"Checking\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.ownershipType\", \"PRIMARY\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.balance.currentBalance.amount\", \"1234.4\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.balance.availableBalance.amount\", \"1123.41\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatus\", \"OPEN\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.open\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.closed\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.negativeBalance\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.delinquent\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.inCollection\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.overLimit\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.writtenOff\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.creditBalance\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.paymentCoupon\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.retirementPlan\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatuses.retPlanOwnedByDeceased\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.summary\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.transferFrom\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.transferTo\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.isHistoryEnabled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.displayFlag.isHistoryEntitled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.enabled\", \"true\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountHidden\", \"false\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.memberNumber\", \"CBS2XUSR012\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.ccAccountId\", \"330001001^1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.accountStatusInt\", \"0\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.diAccountType\", \"1\");",
+ "expectResponseBodyToHaveProperty(\"Accounts.account.dcBillPayAccountNumber\", \"330001001\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/xml1",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "xml1"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML2.postman_collection.json b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML2.postman_collection.json
new file mode 100644
index 0000000..3deda6d
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/directory3/XTEST_DEMO_XML2.postman_collection.json
@@ -0,0 +1,148 @@
+{
+ "info": {
+ "_postman_id": "cfba995b-b05e-47df-bae7-20f7c0e834ea",
+ "name": "XTEST_DEMO_XML2",
+ "description": "Objective: XML responses are internally converted into JSON and can be used with any of the xtest functions. Validate an XML response using the function:\n\n``` javascript\nexpectResponseBodyToHaveUnorderedArray(jsonPathToArray [String], validationList [Array of Objects])\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate xml response using expectResponseBodyToHaveUnorderedArray().",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response body",
+ "expectResponseBodyToHaveUnorderedArray(\"Accounts.account\", [",
+ " {pathToProperty: \"id\", expectedValue: \"KkGHo7-dCNstHv8KT28uNzMZficQcaQwg31wIpM_uwo\"},",
+ " {pathToProperty: \"fiCustomerId\", expectedValue: \"c0a8e326004df0c64b6367a51be34400\"},",
+ " {pathToProperty: \"fiId\", expectedValue: \"DI1008\"},",
+ " {pathToProperty: \"description\", expectedValue: \"NHIST 0 Account - History not supported\"},",
+ " {pathToProperty: \"nickName\", expectedValue: \"NHIST 0 Account - History not supported\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*3221\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.displayValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.pfmValue\", expectedValue: \"7436283221\"},",
+ " {pathToProperty: \"accountNumber.rawHostValue\", expectedValue: \"7436283221^GARBAGE\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"CHECKING\"},",
+ " {pathToProperty: \"fiAccountType.type\", expectedValue: \"1\"},",
+ " {pathToProperty: \"fiAccountType.rawType\", expectedValue: \"1\"},",
+ " {pathToProperty: \"fiAccountType.description\", expectedValue: \"Checking\"},",
+ " {pathToProperty: \"ownershipType\", expectedValue: \"PRIMARY\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: \"84.73\"},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: \"38.21\"},",
+ " {pathToProperty: \"asOfDate\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"},",
+ " {pathToProperty: \"accountStatuses.open\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountStatuses.closed\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.negativeBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.delinquent\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.inCollection\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.overLimit\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.writtenOff\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.creditBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.paymentCoupon\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retirementPlan\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retPlanOwnedByDeceased\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.summary\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferFrom\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferTo\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEnabled\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEntitled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"interestRate\", expectedValue: \"0.004\"},",
+ " {pathToProperty: \"interestYearToDate.amount\", expectedValue: \"56.9\"},",
+ " {pathToProperty: \"interestPriorYearToDate.amount\", expectedValue: \"250.9\"},",
+ " {pathToProperty: \"enabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountHidden\", expectedValue: \"false\"},",
+ " {pathToProperty: \"memberNumber\", expectedValue: \"AUTOCBS20001\"},",
+ " {pathToProperty: \"ccAccountId\", expectedValue: \"7436283221^1\"},",
+ " {pathToProperty: \"accountStatusInt\", expectedValue: \"0\"},",
+ " {pathToProperty: \"diAccountType\", expectedValue: \"1\"},",
+ " {pathToProperty: \"dcBillPayAccountNumber\", expectedValue: \"7436283221\"}",
+ "]);",
+ "expectResponseBodyToHaveUnorderedArray(\"Accounts.account\", [",
+ " {pathToProperty: \"id\", expectedValue: \"J8fhcO2UzfqChL84fZe3odg6PQbwUalR5ncGh7cs1io\"},",
+ " {pathToProperty: \"fiCustomerId\", expectedValue: \"c0a8e326004df0c64b6367a51be34400\"},",
+ " {pathToProperty: \"fiId\", expectedValue: \"DI1008\"},",
+ " {pathToProperty: \"description\", expectedValue: \"Unknown Account Type DITYP -1\"},",
+ " {pathToProperty: \"nickName\", expectedValue: \"Unknown Account Type DITYP -1\"},",
+ " {pathToProperty: \"displayAccountNumber\", expectedValue: \"*0001\"},",
+ " {pathToProperty: \"accountNumber.hostValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.displayValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.pfmValue\", expectedValue: \"7362811980001\"},",
+ " {pathToProperty: \"accountNumber.rawHostValue\", expectedValue: \"7362811980001^GARBAGE\"},",
+ " {pathToProperty: \"category\", expectedValue: \"DEPOSIT\"},",
+ " {pathToProperty: \"accountType\", expectedValue: \"UNKNOWN\"},",
+ " {pathToProperty: \"fiAccountType.type\", expectedValue: \"7321\"},",
+ " {pathToProperty: \"fiAccountType.rawType\", expectedValue: \"7321\"},",
+ " {pathToProperty: \"fiAccountType.description\", expectedValue: \"UNKNOWN\"},",
+ " {pathToProperty: \"ownershipType\", expectedValue: \"PRIMARY\"},",
+ " {pathToProperty: \"balance.currentBalance.amount\", expectedValue: \"500.0\"},",
+ " {pathToProperty: \"balance.availableBalance.amount\", expectedValue: \"500.0\"},",
+ " {pathToProperty: \"asOfDate\"},",
+ " {pathToProperty: \"accountStatus\", expectedValue: \"OPEN\"},",
+ " {pathToProperty: \"accountStatuses.open\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountStatuses.closed\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.negativeBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.delinquent\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.inCollection\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.overLimit\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.writtenOff\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.creditBalance\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.paymentCoupon\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retirementPlan\", expectedValue: \"false\"},",
+ " {pathToProperty: \"accountStatuses.retPlanOwnedByDeceased\", expectedValue: \"false\"},",
+ " {pathToProperty: \"displayFlag.summary\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferFrom\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.transferTo\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEnabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"displayFlag.isHistoryEntitled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"interestRate\", expectedValue: \"0.006\"},",
+ " {pathToProperty: \"interestYearToDate.amount\", expectedValue: \"56.9\"},",
+ " {pathToProperty: \"interestPriorYearToDate.amount\", expectedValue: \"250.9\"},",
+ " {pathToProperty: \"enabled\", expectedValue: \"true\"},",
+ " {pathToProperty: \"accountHidden\", expectedValue: \"false\"},",
+ " {pathToProperty: \"memberNumber\", expectedValue: \"AUTOCBS20001\"},",
+ " {pathToProperty: \"ccAccountId\", expectedValue: \"7362811980001^-1\"},",
+ " {pathToProperty: \"accountStatusInt\", expectedValue: \"0\"},",
+ " {pathToProperty: \"diAccountType\", expectedValue: \"-1\"},",
+ " {pathToProperty: \"dcBillPayAccountNumber\", expectedValue: \"7362811980001\"}",
+ "]);",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/xml2",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "xml2"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json b/lib/unit-tests/test-data/test-project7/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json
new file mode 100644
index 0000000..3401e98
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/invalid-postman-file/XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE.postman_not_valid.json
@@ -0,0 +1,53 @@
+{
+ "info": {
+ "_postman_id": "923d2734-4585-461f-98da-bbb485b59b6b",
+ "name": "XTEST_DEMO_EXPECT_RESPONSE_TO_NOT_HAVE_HEADER_STRING_VALUE",
+ "description": "Objective: Validate for a given response header key that the header value does NOT match.\n\n``` javascript\nexpectResponseToHaveHeader(expectedHeaderKey [String], expectedHeaderValue [String], specialHandling [String] = \"notThisExpectedValue\")\n\n```",
+ "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
+ "_exporter_id": "24782047"
+ },
+ "item": [
+ {
+ "name": "Validate response header key \"Custom-Header\" exists but does NOT have value \"This is the custom header value that will not match\".",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "exec": [
+ "//Load xtest",
+ "var xtest = eval(pm.globals.get(\"xtest\"));",
+ "",
+ "//Start testing using xtest",
+ "startXTest(pm, pm.globals.get(\"useStrictValidation\"));",
+ "",
+ "//Validate response headers",
+ "expectResponseToHaveHeader(\"custom-header\", \"This is the custom header value that will not match\", \"notThisExpectedValue\");",
+ "",
+ "//End testing using xtest",
+ "endXTest();"
+ ],
+ "type": "text/javascript"
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "url": {
+ "raw": "https://xtest-demo.httpsim.schwaby.io/responseToHaveHeader",
+ "protocol": "https",
+ "host": [
+ "xtest-demo",
+ "httpsim",
+ "schwaby",
+ "io"
+ ],
+ "path": [
+ "responseToHaveHeader"
+ ]
+ }
+ },
+ "response": []
+ }
+ ]
+}
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert.pem b/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert.pem
new file mode 100644
index 0000000..67d94dc
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert.pem
@@ -0,0 +1 @@
+success!
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert2.pem b/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert2.pem
new file mode 100644
index 0000000..67d94dc
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/xrun/customTrustedCaCertDirectory/successfulCaCert2.pem
@@ -0,0 +1 @@
+success!
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/xrun/dev1.bulk b/lib/unit-tests/test-data/test-project7/xrun/dev1.bulk
new file mode 100644
index 0000000..677072e
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/xrun/dev1.bulk
@@ -0,0 +1,2 @@
+var1:dev1-var1
+var2:dev1-var2
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/xrun/exclude-list.json b/lib/unit-tests/test-data/test-project7/xrun/exclude-list.json
new file mode 100644
index 0000000..79c1c15
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/xrun/exclude-list.json
@@ -0,0 +1,5 @@
+[
+ "directory2",
+ "empty-directory",
+ "invalid-postman-file"
+]
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/test-project7/xrun/qat1.bulk b/lib/unit-tests/test-data/test-project7/xrun/qat1.bulk
new file mode 100644
index 0000000..2570831
--- /dev/null
+++ b/lib/unit-tests/test-data/test-project7/xrun/qat1.bulk
@@ -0,0 +1,2 @@
+var1:qat1-var1
+var2:qat1-var2
\ No newline at end of file
diff --git a/lib/unit-tests/test-data/trustedCaCertDirectory/successfulCaCert.pem b/lib/unit-tests/test-data/trustedCaCertDirectory/successfulCaCert.pem
new file mode 100644
index 0000000..67d94dc
--- /dev/null
+++ b/lib/unit-tests/test-data/trustedCaCertDirectory/successfulCaCert.pem
@@ -0,0 +1 @@
+success!
\ No newline at end of file
diff --git a/package.json b/package.json
index 8a07fb3..6f7c41e 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@schwabyio/xrun",
- "version": "2.3.4",
+ "version": "2.4.0",
"description": "Postman Extended Runner",
"homepage": "https://github.com/schwabyio/xrun",
"author": "schwabyio",
@@ -17,7 +17,7 @@
"handlebars": "4.7.7",
"json5": "2.2.3",
"marked": "4.2.5",
- "newman": "5.3.2",
+ "newman": "^6.0.0",
"open": "8.4.0",
"prismjs": "1.29.0",
"rimraf": "4.4.1",
@@ -30,7 +30,8 @@
"jest": "^29.5.0"
},
"scripts": {
- "test": "jest --coverage"
+ "test": "jest --coverage",
+ "update": "echo update"
},
"repository": {
"type": "git",