0.6.0 • Published 3 months ago

newman-reporter-csvallinone v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

CSV ALL-in-one newman Reporter

GitHub package.json version Version CodeFactor

  • CSV Result File generator module for newman.
  • This module is based on REST API Automation Test. (JSON request, respone)
  • If you have a problem with using separted version or want more information of running test, please leave a issue at github or email.

0. Change Log

version 0.6.0 (2024.02.15)

1. Fixed parsing empty urlencoded body.

1. Getting Started

1-1. Installation

1. npm i -g newman-reporter-csvallinone
2. https://www.npmjs.com/package/newman-reporter-csvallinone

1-2. How to use

1. You can use this module like any other newman reporter.
2. Open cmd or bash.
3. Type newman cli and add line down below.
4. '-r csvallinone'
	ex) newman run collection -e environment -r csvallinone
5. Default CSV save location. (./$User/newman)

1-3. Export Option

  • --reporter-csvallinone-export
Specify a path where the CSV file will be written to disk.
ex) --reporter-csvallinone-export ./APITest/TestResult/CSV/******.csv
ex) newman run collection -e environment -r csvallinone --reporter-csvallinone-export ./APITest/TestResult/CSV/******.csv

2. CSV Output

2-1. Columns

noCategoryDescexample
1collectionNameRunning Collection nameMarket_Billing_API
2environmentNameRunning Environment nameBilling_googleplay_test
3folderNameRunning Folder name (parsing 2 depth untill now)API_googleplay_payment
4caseNameRunning TestCase nameAPI_googleplay_payment_001
5executedTimeRunning TestCase executed time1627552163138
6stopTimeRunning TestCase stop time1627552163298
7requestMethodRequest method of TestCasePUT
8requestHeaderRequest header of TestCase{"key":"marketKey","value":"sf92mtkfnalsk28jsdw"}
9requestUrlRequest URL of TestCasemarket.com/v1/subscribe
10requestBodyRequest Body of TestCase{"UDID":"ASFJ082LFN29F8SDFMW0FKDF"}
11responseTimeRequest Time of TestCase(millsec)12
12responseStatusResponse Status of excuted TestCaseOK
13responseCodeResponse Status of excuted TestCase200
14responseBodyResponse body of excuted TestCase{"errorCode":0, "subStatus":1}
15iterationIteration of TestCase1
16executedTestPass Assertion that you set at test scriptsubStatus must be '1'
17failedTestFail Assertion that you set at test scripterrorCode must be '1'
18skippedTestSkiped Assertion that you set at test scripterrorMessage must be 'Ok'
19assertionMessageAssertion message for fail TestCaseExpected errorCode '1' but got '0'
20curlcURL of each TestCase (can immediately run at terminalcurl --location --request PUT --data "market.com/v1/subs...
21requestParamsRequest params. (parsing when request params exist)[{"key1":"key1","value":"123"},{"key2":"key2","value":"321"}...
22requestAuthRequest Auth. (parsing when request auth exist)[{"type":"string","value":"header","key":"addTokenTo"}...
  • requestParams & requestAuth is automatically add to columns when request have that items.
  • Default output file name is --> $Collection-Name($Environenment-Name)-$Date.csv
  • ex) Market_Billing_API(Billing_googleplay_test)-2021-06-12-14-55-42-723-0.csv

2-2. Remove unwanted columns

  • You can edit 'columns' variable in 'index.js' for remove unwanted colums.
let columns = [
  // collection info
  'collectionName',
  'environmentName',
  'folderName',
  'caseName',

  // request value
  'executedTime',
  'stopTime',
  'requestMethod',
  'requestHeader',
  'requestUrl',
  'requestBody',

  // response value
  'responseTime',
  'responseStatus',
  'responseCode',
  'responseBody',

  // test info
  'iteration',
  'executedTest',
  'failedTest',
  'skippedTest',
  'assertionMessage',

  // case curl
  'curl'
]

2-3. Extra Info

  • Each Assertion is separated with '||'.
  • cURL is made by combining each column.
0.6.0

3 months ago

0.5.3

2 years ago

0.5.2

2 years ago

0.5.1

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.1.0

3 years ago

0.0.3

3 years ago

0.2.0

3 years ago

0.0.2

3 years ago

0.1.1

3 years ago

0.0.1

3 years ago