Skip to content

Commit

Permalink
Merge pull request #115 from reportportal/develop
Browse files Browse the repository at this point in the history
release 5.1.0
  • Loading branch information
chivekrodis authored Nov 29, 2022
2 parents 3efa92e + e092050 commit 7e05733
Show file tree
Hide file tree
Showing 26 changed files with 6,082 additions and 4,465 deletions.
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
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### Added
- Added support for 7-8 versions of `@cucumber/cucumber` package

### Updated
- `@reportportal/client-javascript` version to the latest

## [5.0.2] - 2021-06-23
### Fixed
Expand Down
28 changes: 4 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Agent for integration CucumberJS with ReportPortal.
* More about [CucumberJS](https://cucumber.io/docs/installation/javascript/)
* More about [ReportPortal](http://reportportal.io/)

This agent works well with cucumber versions from 4.x to 6.x inclusive.
This agent works well with cucumber versions from 7.x.
Documentation for legacy cucumber versions from 4.x to 6.x can be found [here](/modules/api/deprecated/README.md)

## Install agent to your project dir

Expand Down Expand Up @@ -53,7 +54,6 @@ npm install --save-dev @reportportal/agent-js-cucumber
"endpoint": "${rp.endpoint}/api/v1",
"launch": "${rp.launch}",
"project": "${rp.your_project}",
"takeScreenshot": "onFailure",
"description": "Awesome launch description.",
"attributes": [
{
Expand All @@ -69,9 +69,8 @@ npm install --save-dev @reportportal/agent-js-cucumber
}
```
`takeScreenshot` - if this option is defined then framework will take screenshot with _protractor or webdriver_ API if step has failed<br/>
`mode` - Launch mode. Allowable values *DEFAULT* (by default) or *DEBUG*.<br/>
`debug` - this flag allows seeing the logs of the `client-javascript`. Useful for debugging.
`debug` - this flag allows seeing the logs of the `client-javascript`. Useful for debugging.<br/>
`restClientConfig` (optional) - The object with `agent` property for configure [http(s)](https://nodejs.org/api/https.html#https_https_request_url_options_callback) client, may contain other client options eg. `timeout`.
3. Create Report Portal formatter in a new js file, for example `reportPortalFormatter.js`:
Expand All @@ -86,7 +85,7 @@ npm install --save-dev @reportportal/agent-js-cucumber
4. Import RPWorld (provides API for logging and data attaching) into /features/step_definitions/support/world.js
```javascript
let { setWorldConstructor } = require('cucumber');
let { setWorldConstructor } = require('@cucumber/cucumber');
let { RPWorld } = require('@reportportal/agent-js-cucumber');
setWorldConstructor(RPWorld);
```
Expand Down Expand Up @@ -120,8 +119,6 @@ npm install --save-dev @reportportal/agent-js-cucumber
More info in the [examples](https://github.com/reportportal/examples-js/tree/master/example-cucumber) repository.
### TODO parallel launch
## Rerun
To report [rerun](https://github.com/reportportal/documentation/blob/master/src/md/src/DevGuides/rerun.md) to the report portal you need to specify the following options to the config file:
Expand Down Expand Up @@ -160,23 +157,6 @@ To report your steps as logs, you need to pass an additional parameter to the ag

This will report your your steps with logs to a log level without creating statistics for every step.

## Reporting skipped cucumber steps as failed

By default, cucumber marks steps which follow a failed step as `skipped`.
When `scenarioBasedStatistics` is set to `false` (the default behavior)
Report Portal reports these steps as failures to investigate.

To change this behavior and instead mark skipped steps which follow a failed step as `cancelled`,
you need to add an additional parameter to the agent config: `"reportSkippedCucumberStepsOnFailedTest": false`

```json
{
"reportSkippedCucumberStepsOnFailedTest": false
}
```

Steps which are marked as `skipped` that do not follow a failed step will continue to mark the step and the scenario as `skipped`.

## API

### Attachments
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.2
5.0.3-SNAPSHOT
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
moduleFileExtensions: ['js'],
testRegex: '/tests/.*\\.spec.(js)$',
collectCoverageFrom: ['modules/**.js', '!modules/index.js'],
collectCoverageFrom: ['modules/**.js', '!api/deprecated'],
coverageThreshold: {
global: {
branches: 80,
Expand Down
Loading

0 comments on commit 7e05733

Please sign in to comment.