|
1 | 1 | [](https://www.codacy.com/manual/PeterNgTr/codeceptjs-rphelper?utm_source=github.com&utm_medium=referral&utm_content=PeterNgTr/codeceptjs-rphelper&utm_campaign=Badge_Grade) [](https://badge.fury.io/js/codeceptjs-rphelper) [](https://greenkeeper.io/)
|
2 | 2 |
|
3 | 3 | # codeceptjs-rphelper
|
| 4 | + |
4 | 5 | This helpes you integrate the test results of CodeceptJS with ReportPortal
|
5 | 6 |
|
6 |
| -codeceptjs-rphelper is a [CodeceptJS](https://codecept.io/) helper which can publish tests results on [ReportPortal](https://reportportal.io/) after execution. |
| 7 | +`@reportportal/agent-js-codecept` is a [CodeceptJS](https://codecept.io/) plugin which can publish tests results on [ReportPortal](https://reportportal.io/) after execution. |
7 | 8 |
|
8 | 9 | ## Installation
|
| 10 | + |
9 | 11 | ```sh
|
10 |
| -npm i codeceptjs-rphelper --save |
| 12 | +npm i @reportportal/agent-js-codecept --save |
11 | 13 | ```
|
12 | 14 |
|
13 | 15 | ## Configuration
|
14 | 16 |
|
15 |
| -This helper should be added in codecept.json/codecept.conf.js |
| 17 | +This plugin should be added in `codecept.conf.js` |
16 | 18 |
|
17 | 19 | Example:
|
18 | 20 |
|
19 | 21 | ```js
|
20 | 22 | {
|
21 | 23 | ...
|
22 |
| - helpers: { |
23 |
| - ReportPortalHelper: { |
24 |
| - require: 'codeceptjs-rphelper', |
| 24 | + plugins: { |
| 25 | + reportportal: { |
| 26 | + require: '@reportportal/agent-js-codecept', |
25 | 27 | token: 'YOUR_TOKEN',
|
26 | 28 | endpoint: 'http://localhost:8080/api/v1',
|
27 | 29 | launchName: 'This is awesome',
|
28 | 30 | launchDescription: 'This is a description of your launch',
|
29 | 31 | launchAttributes: [{ key: 'yourKey', value: 'yourValue' }],
|
30 | 32 | projectName: 'YOUR_PROJECT',
|
31 | 33 | rerun: false,
|
32 |
| - debug: false |
| 34 | + debug: false, |
| 35 | + enabled: true |
33 | 36 | }
|
34 | 37 | ...
|
35 | 38 | }
|
36 | 39 | ```
|
37 | 40 |
|
38 |
| -To use this helper you need to provide the following info: |
| 41 | +To use this plugin you need to provide the following info: |
39 | 42 |
|
40 | 43 | ```sh
|
41 | 44 | - `token`: which can be found by navigating to the user profile page, clicking the username drop-down in the right header and selecting the "Profile" > "UUID" – is a unique user identifier. UUID is used in automated test configuration files for a user authentication instead of a password. It will allow you to post data, without logging it in the UI.
|
@@ -105,10 +108,20 @@ Success finish launch 65ndx5jucolqsp
|
105 | 108 | ```
|
106 | 109 |
|
107 | 110 | ## Screenshot
|
| 111 | +
|
108 | 112 | 
|
109 | 113 |
|
110 | 114 | All the feature tests are now combine in a single launch
|
111 | 115 | 
|
112 | 116 |
|
113 | 117 | ## Notes
|
| 118 | +
|
114 | 119 | Right now, when running with `codeceptjs run`, all tests will be added under a launch. However, if you run with `codeceptjs run-workers no_of_workers`, there will be multiple launches that match `no_of_workers` and all tests will be added under any random launch. One thing you could try right now is trying to use `codeceptjs run-workers --suites no_of_workers`, by that, you won't get the messy results on `reportportal`.
|
| 120 | +
|
| 121 | +## Debugging Plugin |
| 122 | +
|
| 123 | +To debug this plugin run script enabing DEBUG env variable: |
| 124 | +
|
| 125 | +``` |
| 126 | +DEBUG="codeceptjs:reportportal" npx codeceptjs run |
| 127 | +``` |
0 commit comments