-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit e977421
Showing
12 changed files
with
5,776 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
}, | ||
extends: ['standard-with-typescript', 'plugin:prettier/recommended'], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
plugins: ['prettier'], | ||
ignorePatterns: ['dist/', 'tests/'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
- run: npm ci | ||
- run: npm run build | ||
- run: npm run lint-check | ||
- run: npm run format-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist | ||
node_modules | ||
ctrf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Postman Newman JSON Reporter - CTRF | ||
|
||
A Postman newman test reporter to generate JSON test reports that are [CTRF](https://ctrf.io) compliant. | ||
|
||
[Common Test Report Format](https://ctrf.io) helps you generate JSON reports that are agnostic of specific programming languages or test frameworks. | ||
|
||
## Features | ||
|
||
- Generate JSON test reports that are [CTRF](https://ctrf.io) compliant | ||
- Straightforward integration with newman | ||
|
||
## What is CTRF? | ||
|
||
A JSON test report schema that is the same structure, no matter which testing tool is used. It's created to provide consistent test reporting agnostic of specific programming languages or testing frameworks. Where many testing frameworks exist, each generating JSON reports in their own way, CTRF provides a standardised schema helping you generate the same report anywhere. | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install --save-dev newman-reporter-ctrf-json | ||
``` | ||
|
||
Run your tests with the reporter argument: | ||
|
||
```bash | ||
newman run ./postman_collection.json -r newman-reporter-ctrf-json | ||
``` | ||
|
||
You'll find a JSON file named `ctrf-report.json` in the root directory. | ||
|
||
## Test Object Properties | ||
|
||
The test object in the report includes the following [CTRF properties](https://ctrf.io/docs/schema/test): | ||
|
||
| Name | Type | Required | Details | | ||
| ---------- | ------ | -------- | ----------------------------------------------------------------------------------- | | ||
| `name` | String | Required | The name of the test. | | ||
| `status` | String | Required | The outcome of the test. One of: `passed`, `failed`, `skipped`, `pending`, `other`. | | ||
| `duration` | Number | Required | The time taken for the test execution, in milliseconds. | |
Oops, something went wrong.