@qavajs/format-report-portal 0.15.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.MD CHANGED
@@ -1,3 +1,25 @@
1
+ # Change Log
2
+
3
+ All notable changes to the "@qavajs/format-report-portal" will be documented in this file.
4
+
5
+ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6
+
7
+ :rocket: - new feature
8
+
9
+ :beetle: - bugfix
10
+
11
+ :x: - deprecation/removal
12
+
13
+ :pencil: - chore
14
+
15
+ :microscope: - experimental
16
+
17
+ ## 1.1.0
18
+ - :rocket: updated report portal client
19
+
20
+ ## 1.0.0
21
+ - added `legacyTimeFormat` flag to support old versions of report portal
22
+
1
23
  ## 0.15.0
2
24
  - added request/response renderer of internal mime type _text/x.response.json_
3
25
 
package/README.MD CHANGED
@@ -1,35 +1,36 @@
1
1
  ## @qavajs/format-report-portal
2
- This package is formatter for EPAM report portal
2
+ qavajs and cucumberjs formatter for EPAM [Report Portal](https://reportportal.io/)
3
3
 
4
4
  ### Install
5
- `npm install @qavajs/format-report-portal`
5
+ ```
6
+ npm install @qavajs/format-report-portal
7
+ ```
6
8
 
7
9
  ### Configuration
8
10
 
9
11
  add formatter to config.js
10
- ```javascript
11
- module.exports = {
12
- default: {
13
- format: [
14
- ['@qavajs/format-report-portal', 'report/rp.out']
15
- ],
16
- formatOptions: {
17
- rpConfig: {
18
- enable: true,
19
- debug: false,
20
- apiKey: 'your token',
21
- endpoint: 'https://your-rp-instance/api/v1',
22
- description: 'Description',
23
- tags: ['Tag'],
24
- project: 'your project',
25
- launch: 'your launch name',
26
- mode: 'DEFAULT',
27
- retry: 1, // number of retries to send result to report portal (default - 1)
28
- ignoreErrors: false, // ignore RP errors (default: false)
29
- showLaunchURL: true, // log report portal launch link,
30
- tagsAsAttributes: true // (default: false tags go to description)
31
- },
32
- }
12
+ ```typescript
13
+ export default {
14
+ format: [
15
+ ['@qavajs/format-report-portal', 'report/rp.out']
16
+ ],
17
+ formatOptions: {
18
+ rpConfig: {
19
+ enable: true,
20
+ debug: false,
21
+ apiKey: 'your token',
22
+ endpoint: 'https://your-rp-instance/api/v1',
23
+ description: 'Description',
24
+ tags: ['Tag'],
25
+ project: 'your project',
26
+ launch: 'your launch name',
27
+ mode: 'DEFAULT',
28
+ retry: 1, // number of retries to send result to report portal (default - 1)
29
+ ignoreErrors: false, // ignore RP errors (default: false)
30
+ showLaunchURL: true, // log report portal launch link,
31
+ tagsAsAttributes: true, // (default: false - tags go to description)
32
+ legacyTimeFormat: true // (default: false - use legacy milliseconds precision instead of microseconds)
33
+ },
33
34
  }
34
35
  }
35
36
  ```
@@ -37,8 +38,8 @@ Option `enable` is set to `true` even if it is not defined explicitly in rpConfi
37
38
 
38
39
  ### Test Level Attributes
39
40
  Test level attributes can be added via cucumber logs e.g. in Before hook
40
- ```javascript
41
- const { Before } = require('@cucumber/cucumber');
41
+ ```typescript
42
+ import { Before } from '@cucumber/cucumber';
42
43
 
43
44
  Before(function () {
44
45
  this.log('log from before'); //just log
@@ -49,9 +50,13 @@ Before(function () {
49
50
  ### Run Unit Tests
50
51
  add token.json file with rp token and other config
51
52
  run
52
- `npm run test`
53
+ ```
54
+ npm run test
55
+ ```
53
56
 
54
57
  ### Run E2E Tests
55
58
  add token.json file with rp token and other config
56
59
  run
57
- `npm run test-e2e`
60
+ ```
61
+ npm run test-e2e
62
+ ```
package/index.js CHANGED
@@ -17,6 +17,9 @@ class RPFormatter extends Formatter {
17
17
  this.rpClient = new RPClient(this.rpConfig);
18
18
  this.promiseQ = [];
19
19
  this.stepDefinitions = {};
20
+ if (this.rpConfig.legacyTimeFormat) {
21
+ this.rpClient.helpers.now = () => { return Date.now() };
22
+ }
20
23
  }
21
24
 
22
25
  async processEnvelope(envelope) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qavajs/format-report-portal",
3
- "version": "0.15.0",
3
+ "version": "1.1.0",
4
4
  "description": "cucumber formatter for report portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,12 +21,12 @@
21
21
  },
22
22
  "homepage": "https://github.com/qavajs/format-report-portal#readme",
23
23
  "dependencies": {
24
- "@reportportal/client-javascript": "^5.1.4"
24
+ "@reportportal/client-javascript": "^5.4.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@cucumber/cucumber": "^10.8.0",
28
- "@qavajs/cli": "^0.39.0",
29
- "@qavajs/memory": "^1.7.0",
30
- "jest": "^29.7.0"
27
+ "@cucumber/cucumber": "^12.2.0",
28
+ "@qavajs/core": "^2.7.0",
29
+ "@qavajs/memory": "^1.10.2",
30
+ "jest": "^30.1.3"
31
31
  }
32
32
  }