Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Change Log

All notable changes to the "@qavajs/format-report-portal" will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

:rocket: - new feature

:beetle: - bugfix

:x: - deprecation/removal

:pencil: - chore

:microscope: - experimental

## 1.1.0
- :rocket: updated report portal client

## 1.0.0
- added `legacyTimeFormat` flag to support old versions of report portal

Expand Down
64 changes: 34 additions & 30 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
## @qavajs/format-report-portal
This package is formatter for EPAM report portal
qavajs and cucumberjs formatter for EPAM [Report Portal](https://reportportal.io/)

### Install
`npm install @qavajs/format-report-portal`
```
npm install @qavajs/format-report-portal
```

### Configuration

add formatter to config.js
```javascript
module.exports = {
default: {
format: [
['@qavajs/format-report-portal', 'report/rp.out']
],
formatOptions: {
rpConfig: {
enable: true,
debug: false,
apiKey: 'your token',
endpoint: 'https://your-rp-instance/api/v1',
description: 'Description',
tags: ['Tag'],
project: 'your project',
launch: 'your launch name',
mode: 'DEFAULT',
retry: 1, // number of retries to send result to report portal (default - 1)
ignoreErrors: false, // ignore RP errors (default: false)
showLaunchURL: true, // log report portal launch link,
tagsAsAttributes: true, // (default: false - tags go to description)
legacyTimeFormat: true // (default: false - use legacy milliseconds precision instead of microseconds)
},
}
```typescript
export default {
format: [
['@qavajs/format-report-portal', 'report/rp.out']
],
formatOptions: {
rpConfig: {
enable: true,
debug: false,
apiKey: 'your token',
endpoint: 'https://your-rp-instance/api/v1',
description: 'Description',
tags: ['Tag'],
project: 'your project',
launch: 'your launch name',
mode: 'DEFAULT',
retry: 1, // number of retries to send result to report portal (default - 1)
ignoreErrors: false, // ignore RP errors (default: false)
showLaunchURL: true, // log report portal launch link,
tagsAsAttributes: true, // (default: false - tags go to description)
legacyTimeFormat: true // (default: false - use legacy milliseconds precision instead of microseconds)
},
}
}
```
Option `enable` is set to `true` even if it is not defined explicitly in rpConfig section.

### Test Level Attributes
Test level attributes can be added via cucumber logs e.g. in Before hook
```javascript
const { Before } = require('@cucumber/cucumber');
```typescript
import { Before } from '@cucumber/cucumber';

Before(function () {
this.log('log from before'); //just log
Expand All @@ -50,9 +50,13 @@ Before(function () {
### Run Unit Tests
add token.json file with rp token and other config
run
`npm run test`
```
npm run test
```

### Run E2E Tests
add token.json file with rp token and other config
run
`npm run test-e2e`
```
npm run test-e2e
```
Loading