wdio-test-ledger-service 9.0.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +11 -10
- package/.release-it.json +5 -0
- package/README.md +14 -14
- package/package.json +2 -2
- package/src/index.js +3 -3
|
@@ -12,31 +12,33 @@ on:
|
|
|
12
12
|
- 'patch'
|
|
13
13
|
- 'minor'
|
|
14
14
|
- 'major'
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
id-token: write
|
|
18
|
+
contents: write
|
|
17
19
|
|
|
18
20
|
jobs:
|
|
19
21
|
release:
|
|
20
22
|
runs-on: ubuntu-latest
|
|
21
23
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
24
|
+
- uses: actions/checkout@v4
|
|
23
25
|
with:
|
|
24
26
|
ref: 'master'
|
|
25
27
|
fetch-depth: 0
|
|
26
|
-
- uses: actions/setup-node@
|
|
28
|
+
- uses: actions/setup-node@v4
|
|
27
29
|
with:
|
|
28
30
|
node-version: '20'
|
|
31
|
+
registry-url: 'https://registry.npmjs.org'
|
|
29
32
|
|
|
30
|
-
- name:
|
|
33
|
+
- name: Update npm
|
|
31
34
|
run: |
|
|
32
|
-
npm
|
|
33
|
-
npm
|
|
34
|
-
npm whoami
|
|
35
|
+
npm install -g npm@latest
|
|
36
|
+
npm --version
|
|
35
37
|
|
|
36
38
|
- name: Git Setup
|
|
37
39
|
run: |
|
|
38
40
|
git config --global user.email "wpbrock@gmail.com"
|
|
39
|
-
git config --global user.name "Test
|
|
41
|
+
git config --global user.name "Test Ledger Service Release Bot"
|
|
40
42
|
|
|
41
43
|
- name: Install Dependencies
|
|
42
44
|
run: npm ci
|
|
@@ -44,4 +46,3 @@ jobs:
|
|
|
44
46
|
- run: npm run release -- ${{ github.event.inputs.release_type }}
|
|
45
47
|
env:
|
|
46
48
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
47
|
-
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
|
package/.release-it.json
ADDED
package/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# WebdriverIO Test
|
|
1
|
+
# WebdriverIO Test Ledger Service
|
|
2
2
|
|
|
3
|
-
WDIO service that takes results from [wdio-test-reporter](https://github.com/WillBrock/wdio-test-reporter) and uploads them to [
|
|
3
|
+
WDIO service that takes results from [wdio-test-reporter](https://github.com/WillBrock/wdio-test-ledger-reporter) and uploads them to [testledger.dev](https://testledger.dev)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
testledger.dev stores and tracks all test runs with extensive details about each test. This gives you a historical overivew of how your tests are running.
|
|
6
6
|
|
|
7
7
|
Setup is very simple. All you need to do is add the service and reporter to the `services` and `reporters` arrays in your wdio.conf.js file.
|
|
8
8
|
|
|
9
9
|
## Install the service
|
|
10
10
|
|
|
11
11
|
```
|
|
12
|
-
npm install wdio-test-
|
|
12
|
+
npm install wdio-test-ledger-service
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
## Add the service to the services array in wdio.conf.js
|
|
16
16
|
|
|
17
17
|
```
|
|
18
|
-
services: [['test-
|
|
19
|
-
reporterOutputDir : `./
|
|
20
|
-
apiUrl : `app-api.
|
|
21
|
-
username : `jenkins@foobar.com`, // app.
|
|
22
|
-
apiToken : `12345`, // Found in the app.
|
|
18
|
+
services: [['test-ledger', {
|
|
19
|
+
reporterOutputDir : `./testledger`, // This must match the outputDir from the wdio-test-reporter
|
|
20
|
+
apiUrl : `app-api.testledger.dev`, // Defaults to app-api.testledger.dev if none is set
|
|
21
|
+
username : `jenkins@foobar.com`, // app.testledger.dev username
|
|
22
|
+
apiToken : `12345`, // Found in the app.testledger.dev under your proifle section
|
|
23
23
|
projectId : 123, // Only needed if using more than one project
|
|
24
24
|
appVersion : `2.8.10`, // The code version can also be set here
|
|
25
25
|
enableFlaky : 1, // Will mark tests as flaky if it detects them based on previous runs
|
|
@@ -28,15 +28,15 @@ services: [['test-reporter', {
|
|
|
28
28
|
|
|
29
29
|
You will create a custom `username` and `apiToken` in the UI under Settings -> Profile -> API Keys
|
|
30
30
|
|
|
31
|
-
## Add the wdio-test-reporter to the reporters array in wdio.conf.js
|
|
31
|
+
## Add the wdio-test-ledger-reporter to the reporters array in wdio.conf.js
|
|
32
32
|
|
|
33
33
|
```
|
|
34
|
-
npm install wdio-test-reporter
|
|
34
|
+
npm install wdio-test-ledger-reporter
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
```
|
|
38
|
-
reporters : [[`test`, {
|
|
39
|
-
outputDir : `./
|
|
38
|
+
reporters : [[`test-ledger`, {
|
|
39
|
+
outputDir : `./testledger`
|
|
40
40
|
}]]
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -45,5 +45,5 @@ reporters : [[`test`, {
|
|
|
45
45
|
Environment variables can be set when running tests that the server will use to add to the results
|
|
46
46
|
|
|
47
47
|
* `RUN_TITLE` - Title of the test run. This might be something like a Jira issue key. Defaults to a timestamp if not specified
|
|
48
|
-
* `RUN_UUID` - UUID which can be used to directly link to the test run results. e.g. https://app.
|
|
48
|
+
* `RUN_UUID` - UUID which can be used to directly link to the test run results. e.g. https://app.testledger.dev/runs/c26b23d8-eb9f-4ff4-a884-5cb9f3d3aba5<uuid>
|
|
49
49
|
* `APP_VERSION` - Set the version of app this test run ran against
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wdio-test-ledger-service",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "WebdriverIO server to send reporter data to testledger.dev",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -36,6 +36,6 @@
|
|
|
36
36
|
"node-fetch": "^3.3.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"release-it": "^
|
|
39
|
+
"release-it": "^19.0.5"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/src/index.js
CHANGED
|
@@ -3,9 +3,9 @@ import path from 'path';
|
|
|
3
3
|
import btoa from 'btoa';
|
|
4
4
|
import { SevereServiceError } from 'webdriverio';
|
|
5
5
|
|
|
6
|
-
const api_url = `https://app-api.
|
|
6
|
+
const api_url = `https://app-api.testledger.dev`;
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class TestLedgerLauncher {
|
|
9
9
|
constructor(options) {
|
|
10
10
|
this.options = options;
|
|
11
11
|
|
|
@@ -203,4 +203,4 @@ class TestReporterLauncher {
|
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
export default class TestReporterService {};
|
|
206
|
-
export const launcher =
|
|
206
|
+
export const launcher = TestLedgerLauncher;
|