wdio-test-ledger-service 9.2.0 → 9.2.2

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/README.md CHANGED
@@ -23,6 +23,9 @@ services: [['test-ledger', {
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
26
+ uploadArtifacts : true, // Enable screenshot/video artifact uploads
27
+ screenshotDir : `./screenshots`, // Directory containing screenshots
28
+ videoDir : `./_results_/videos`, // Directory containing videos (e.g. from wdio-video-reporter)
26
29
  }]],
27
30
  ```
28
31
 
@@ -40,6 +43,43 @@ reporters : [[`test-ledger`, {
40
43
  }]]
41
44
  ```
42
45
 
46
+ ## Artifact Uploads (Screenshots & Videos)
47
+
48
+ The service can upload screenshots and videos to Test Ledger, making them viewable directly in the UI alongside test results.
49
+
50
+ ### Configuration
51
+
52
+ | Option | Type | Description |
53
+ |--------|------|-------------|
54
+ | `uploadArtifacts` | `boolean` | Enable artifact uploads. Default: `false` |
55
+ | `screenshotDir` | `string` | Directory containing screenshot files (png, jpg, jpeg, gif, webp) |
56
+ | `videoDir` | `string` | Directory containing video files (webm, mp4, mov) |
57
+
58
+ ### Example with wdio-video-reporter
59
+
60
+ ```javascript
61
+ reporters: [
62
+ ['video', {
63
+ saveAllVideos : false, // Only save videos for failed tests
64
+ videoSlowdownMultiplier : 3,
65
+ outputDir : './_results_/videos'
66
+ }],
67
+ ['test-ledger', {
68
+ outputDir : './testledger'
69
+ }]
70
+ ],
71
+ services: [['test-ledger', {
72
+ reporterOutputDir : './testledger',
73
+ username : 'your-email@example.com',
74
+ apiToken : 'your-api-token',
75
+ uploadArtifacts : true,
76
+ screenshotDir : './screenshots',
77
+ videoDir : './_results_/videos'
78
+ }]]
79
+ ```
80
+
81
+ Artifacts are matched to test suites based on filename. The service looks for the spec file name within the artifact filename.
82
+
43
83
  ## Environment variables
44
84
 
45
85
  Environment variables can be set when running tests that the server will use to add to the results
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wdio-test-ledger-service",
3
- "version": "9.2.0",
3
+ "version": "9.2.2",
4
4
  "description": "WebdriverIO server to send reporter data to testledger.dev",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -34,9 +34,9 @@ class TestLedgerLauncher {
34
34
  }
35
35
 
36
36
  // Artifact upload options
37
- this.upload_artifacts = this.options.upload_artifacts || false;
38
- this.screenshot_dir = this.options.screenshot_dir || null;
39
- this.video_dir = this.options.video_dir || null;
37
+ this.upload_artifacts = this.options.uploadArtifacts || false;
38
+ this.screenshot_dir = this.options.screenshotDir || null;
39
+ this.video_dir = this.options.videoDir || null;
40
40
  }
41
41
 
42
42
  onPrepare() {