Skip to content

Commit

Permalink
Release 5.0.2 (#26)
Browse files Browse the repository at this point in the history
* 5.0.1 -> 5.0.2-SNAPSHOT

* EPMRPP-72798 || update release pipeline node v12

* EPMRPP-73451 || bump client js version (#20)

* EPMRPP-65865 || Reduce package size (#21)

Co-authored-by: Aleksandr Zyabrev <[email protected]>

* EPMRPP-74329 || TestCaseId reporting (#22)

Co-authored-by: Aleksandr Zyabrev <[email protected]>

* EPMRPP-75816 || provide skippedIssue option (#24)

* EPMRPP-75498 || add nested steps reporting (#23)

* EPMRPP-75498 || add nested steps reporting

* EPMRPP-75498 || code review fixes - 1

* Update changelog file (#27)

* update changelog file

* Update changelog entries

Co-authored-by: Ilya Hancharyk <[email protected]>

* Fix readme link in changelog file

* Provide TS definitions

* Add specific tsconfig for eslint

Co-authored-by: reportportal.io <reportportal.io>
Co-authored-by: Mikhail Sidarkevich <[email protected]>
Co-authored-by: Mikhail Sidarkevich <[email protected]>
Co-authored-by: Aleksandr Zyabrev <[email protected]>
Co-authored-by: Aleksandr Zyabrev <[email protected]>
  • Loading branch information
5 people authored May 31, 2022
1 parent f9362f0 commit de3b565
Show file tree
Hide file tree
Showing 19 changed files with 365 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": "./tsconfig.json"
"project": "./tsconfig.eslint.json"
},
"rules": {
"@typescript-eslint/no-plusplus": 0,
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Configure git
run: |
git config --global user.email "reportportal.io"
Expand Down
14 changes: 0 additions & 14 deletions .npmignore

This file was deleted.

11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### Added
- [testCaseId](https://reportportal.io/docs/Test-case-ID%3Ewhat-is-it-test-case-id) reporting via [`ReportingApi.setTestCaseId`](README.md#setTestCaseId)
- Support nested steps for Cucumber reporting via `cucumberNestedSteps` flag
- `skippedIssue` parameter to not mark skipped tests as 'To Investigate' by default
- TypeScript definitions provided

### Updated
- `@reportportal/client-javascript` bumped to version `5.0.6`

### Changed
- Package size reduced

## [5.0.1] - 2021-10-05
### Fixed
Expand Down
71 changes: 58 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const config = {
attributes: [{ key: 'key', value: 'value' }, { value: 'value' }],
attachPicturesToLogs: false,
rerun: false,
rerunOf: 'launchUuid of already existed launch',
rerunOf: 'launchUuid of already existed launch',
cucumberNestedSteps: false,
skippedIssue: true,
};

exports.config = {
Expand All @@ -38,17 +40,35 @@ exports.config = {
// ...
};
```
| Parameter | Description |
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
| token | User's Report Portal token from which you want to send requests. It can be found on the profile page of this user.|
| endpoint | URL of your server. For example 'https://server:8080/api/v1'. |
| launch | Name of launch at creation. |
| project | The name of the project in which the launches will be created. |
| rerun | *Default: false.* Enable [rerun](https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/rerun.md)|
| rerunOf | UUID of launch you want to rerun. If not specified, report portal will update the latest launch with the same name|
| mode | Launch mode. Allowable values *DEFAULT* (by default) or *DEBUG*.|
| attachPicturesToLogs | Automatically add screenshots|
| debug | This flag allows seeing the logs of the client-javascript. Useful for debugging.|
| Parameter | Description |
|----------------------|--------------------------------------------------------------------------------------------------------------------------|
| token | User's Report Portal token from which you want to send requests. It can be found on the profile page of this user. |
| endpoint | URL of your server. For example 'https://server:8080/api/v1'. |
| launch | Name of launch at creation. |
| project | The name of the project in which the launches will be created. |
| rerun | *Default: false.* Enable [rerun](https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/rerun.md)|
| rerunOf | UUID of launch you want to rerun. If not specified, report portal will update the latest launch with the same name |
| mode | Launch mode. Allowable values *DEFAULT* (by default) or *DEBUG*. |
| attachPicturesToLogs | Automatically add screenshots |
| debug | This flag allows seeing the logs of the client-javascript. Useful for debugging. |
| cucumberNestedSteps | [Report your steps as logs](https://github.com/reportportal/agent-js-webdriverio#step-reporting-configuration) |
| skippedIssue| *Default: true.* ReportPortal provides feature to mark skipped tests as not 'To Investigate' items on WS side.<br> Parameter could be equal boolean values:<br> *TRUE* - skipped tests considered as issues and will be marked as 'To Investigate' on Report Portal.<br> *FALSE* - skipped tests will not be marked as 'To Investigate' on application.|

## Step reporting configuration

By default, this agent reports the following structure:

- feature - SUITE
- scenario - TEST
- step - STEP

You may change this behavior to report steps to the log level by enabling scenario-based reporting:

- feature - TEST
- scenario - STEP
- step - log item

To report your steps as logs, you need to pass an additional parameter to the agent config: `"cucumberNestedSteps": true`

## Reporting

Expand Down Expand Up @@ -153,7 +173,32 @@ Given('I do something awesome', () => {
//...
});
```
> **Note:** Agent is not supported adding description to the `scenario`.
> **Note:** Agent is not supported adding description to the `scenario`.
### setTestCaseId
`ReportingApi.setTestCaseId(testCaseId: string, suite?: string);`
**required**: `testCaseId`

Examples:
```js
// Jasmine
describe('suite name', () => {
ReportingApi.setTestCaseId('suiteTestCaseId', 'suite name'); // the second parameter must match the name of the suite
it('some test', () => {
ReportingApi.setTestCaseId('testCaseId');
// ...
})
});
```
> **Note:** Pay attention if you want to provide testCaseId to the `suite` you should pass describe name as a parameter.
```js
// Cucumber
Given('I do something awesome', () => {
ReportingApi.setTestCaseId('testCaseId');
//...
});
```

### setStatus
Assign corresponding status to the current test item or suite.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.1
5.0.2-SNAPSHOT
106 changes: 68 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "5.0.1",
"description": "Agent for integration Webdriver.io with ReportPortal.",
"main": "build/index.js",
"types": "build/index.d.ts",
"scripts": {
"build": "npm run clean && tsc",
"clean": "rimraf ./build",
Expand All @@ -12,7 +13,7 @@
"test:coverage": "jest --coverage"
},
"dependencies": {
"@reportportal/client-javascript": "^5.0.5",
"@reportportal/client-javascript": "^5.0.6",
"@wdio/reporter": "^7.13.2"
},
"devDependencies": {
Expand All @@ -39,6 +40,9 @@
"type": "git",
"url": "git+https://github.com/reportportal/agent-js-webdriverio.git"
},
"files": [
"/build"
],
"author": "ReportPortal.io",
"license": "Apache-2.0",
"bugs": {
Expand Down
Loading

0 comments on commit de3b565

Please sign in to comment.