@reportportal/agent-js-jest
Advanced tools
Comparing version 5.0.8 to 5.1.0
{ | ||
"name": "@reportportal/agent-js-jest", | ||
"version": "5.0.8", | ||
"version": "5.1.0", | ||
"description": "A Jest reporter that uploads test results to ReportPortal", | ||
"main": "index.js", | ||
"main": "src/index.js", | ||
"repository": { | ||
@@ -19,21 +19,19 @@ "type": "git", | ||
"engines": { | ||
"node": ">=10.x" | ||
"node": ">=12.x" | ||
}, | ||
"files": [ | ||
"index.js", | ||
"utils", | ||
"constants" | ||
"src" | ||
], | ||
"dependencies": { | ||
"@reportportal/client-javascript": "~5.0.15", | ||
"@reportportal/client-javascript": "~5.1.4", | ||
"strip-ansi": "^6.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.5.3", | ||
"jest": "^29.6.1", | ||
"eslint": "^8.45.0", | ||
"@types/jest": "^29.5.12", | ||
"jest": "^29.7.0", | ||
"eslint": "^8.57.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.27.5", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"eslint-config-prettier": "^8.10.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
@@ -40,0 +38,0 @@ "prettier": "^2.8.8" |
@@ -79,21 +79,22 @@ # @reportportal/agent-js-jest | ||
| Option | Necessity | Default | Description | | ||
|-----------------------|------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| apiKey | Required | | User's reportportal token from which you want to send requests. It can be found on the profile page of this user. | | ||
| endpoint | Required | | URL of your server. For example 'https://server:8080/api/v1'. | | ||
| launch | Required | | Name of launch at creation. | | ||
| project | Required | | The name of the project in which the launches will be created. | | ||
| attributes | Optional | [] | Launch attributes. | | ||
| description | Optional | '' | Launch description. | | ||
| rerun | Optional | false | Enable [rerun](https://reportportal.io/docs/dev-guides/RerunDevelopersGuide) | | ||
| rerunOf | Optional | Not set | UUID of launch you want to rerun. If not specified, reportportal will update the latest launch with the same name | | ||
| mode | Optional | 'DEFAULT' | Results will be submitted to Launches page <br/> *'DEBUG'* - Results will be submitted to Debug page. | | ||
| skippedIssue | Optional | true | reportportal provides feature to mark skipped tests as not 'To Investigate'. <br/> Option could be equal boolean values: <br/> *true* - skipped tests considered as issues and will be marked as 'To Investigate' on reportportal. <br/> *false* - skipped tests will not be marked as 'To Investigate' on application. | | ||
| debug | Optional | false | This flag allows seeing the logs of the client-javascript. Useful for debugging. | | ||
| launchId | Optional | Not set | The _ID_ of an already existing launch. The launch must be in 'IN_PROGRESS' status while the tests are running. Please note that if this _ID_ is provided, the launch will not be finished at the end of the run and must be finished separately. | | ||
| restClientConfig | Optional | Not set | 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`](https://github.com/reportportal/client-javascript#timeout-30000ms-on-axios-requests). <br/> Visit [client-javascript](https://github.com/reportportal/client-javascript) for more details. | | ||
| isLaunchMergeRequired | Optional | false | This flag determines whether to create temp files with the UUIDs of started launches and allow them to be merged using [`client-javascript`'s `mergeLaunches` method](https://github.com/reportportal/client-javascript#mergelaunches). Temp file format: `rplaunch-${launch_uuid}.tmp`. | | ||
| launchUuidPrint | Optional | false | Whether to print the current launch UUID. | | ||
| launchUuidPrintOutput | Optional | 'STDOUT' | Launch UUID printing output. Possible values: 'STDOUT', 'STDERR'. Works only if `launchUuidPrint` set to `true`. | | ||
| token | Deprecated | Not set | Use `apiKey` instead. | | ||
| Option | Necessity | Default | Description | | ||
|------------------------------------|------------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| apiKey | Required | | User's reportportal token from which you want to send requests. It can be found on the profile page of this user. | | ||
| endpoint | Required | | URL of your server. For example 'https://server:8080/api/v1'. Use `api/v2` for asynchronous reporting. | | ||
| launch | Required | | Name of launch at creation. | | ||
| project | Required | | The name of the project in which the launches will be created. | | ||
| attributes | Optional | [] | Launch attributes. | | ||
| description | Optional | '' | Launch description. | | ||
| rerun | Optional | false | Enable [rerun](https://reportportal.io/docs/dev-guides/RerunDevelopersGuide) | | ||
| rerunOf | Optional | Not set | UUID of launch you want to rerun. If not specified, reportportal will update the latest launch with the same name. Works only if `rerun` set to `true`. | | ||
| mode | Optional | 'DEFAULT' | Results will be submitted to Launches page <br/> *'DEBUG'* - Results will be submitted to Debug page. | | ||
| skippedIssue | Optional | true | reportportal provides feature to mark skipped tests as not 'To Investigate'. <br/> Option could be equal boolean values: <br/> *true* - skipped tests considered as issues and will be marked as 'To Investigate' on reportportal. <br/> *false* - skipped tests will not be marked as 'To Investigate' on application. | | ||
| debug | Optional | false | This flag allows seeing the logs of the client-javascript. Useful for debugging. | | ||
| launchId | Optional | Not set | The _ID_ of an already existing launch. The launch must be in 'IN_PROGRESS' status while the tests are running. Please note that if this _ID_ is provided, the launch will not be finished at the end of the run and must be finished separately. | | ||
| restClientConfig | Optional | Not set | 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`](https://github.com/reportportal/client-javascript#timeout-30000ms-on-axios-requests). <br/> Visit [client-javascript](https://github.com/reportportal/client-javascript) for more details. | | ||
| isLaunchMergeRequired | Optional | false | This flag determines whether to create temp files with the UUIDs of started launches and allow them to be merged using [`client-javascript`'s `mergeLaunches` method](https://github.com/reportportal/client-javascript#mergelaunches). Temp file format: `rplaunch-${launch_uuid}.tmp`. | | ||
| launchUuidPrint | Optional | false | Whether to print the current launch UUID. | | ||
| launchUuidPrintOutput | Optional | 'STDOUT' | Launch UUID printing output. Possible values: 'STDOUT', 'STDERR'. Works only if `launchUuidPrint` set to `true`. | | ||
| extendTestDescriptionWithLastError | Optional | true | If set to `true` the latest error log will be attached to the test case description. | | ||
| token | Deprecated | Not set | Use `apiKey` instead. | | ||
@@ -132,2 +133,31 @@ The following options can be overridden using ENVIRONMENT variables: | ||
## Reporting API | ||
This reporter provides `ReportingApi` in global variables to use it directly in tests to send some additional data to the report. | ||
*Note:* `ReportingApi` does not support tests running in [`concurrent` mode](https://jestjs.io/docs/api#testconcurrentname-fn-timeout) at the moment. | ||
### Reporting API methods | ||
#### attachment | ||
Send file to ReportPortal for the current test. Should be called inside of corresponding test.<br/> | ||
`ReportingApi.attachment(file: {name: string; type: string; content: string | Buffer;}, description?: string);`<br/> | ||
**required**: `file`<br/> | ||
**optional**: `description`<br/> | ||
Example: | ||
```javascript | ||
test('should be passed with attachment', () => { | ||
const fileName = 'test.png'; | ||
const fileContent = fs.readFileSync(path.resolve(__dirname, './attachments', fileName)); | ||
ReportingApi.attachment({ | ||
name: fileName, | ||
type: 'image/png', | ||
content: fileContent.toString('base64'), | ||
}, 'Description'); | ||
expect(true).toBe(true); | ||
}); | ||
``` | ||
# Copyright Notice | ||
@@ -134,0 +164,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44835
9
539
171
1
+ Added@reportportal/client-javascript@5.1.4(transitive)
+ Addedaxios@1.7.9(transitive)
+ Addedaxios-retry@4.5.0(transitive)
+ Addedbrace-expansion@2.0.1(transitive)
+ Addedglob@8.1.0(transitive)
+ Addedminimatch@5.1.6(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
- Removed@babel/runtime@7.26.0(transitive)
- Removed@reportportal/client-javascript@5.0.15(transitive)
- Removedaxios@0.27.2(transitive)
- Removedaxios-retry@3.9.1(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedglob@7.2.3(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedregenerator-runtime@0.14.1(transitive)