@appliqation/automation-sdk 2.1.11 → 2.2.0

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.
Files changed (38) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +247 -7
  3. package/package.json +1 -1
  4. package/src/AppliqationClient.js +1 -1
  5. package/src/constants.js +0 -0
  6. package/src/core/AuthManager.js +0 -0
  7. package/src/core/HttpClient.js +0 -0
  8. package/src/index.d.ts +0 -0
  9. package/src/index.js +0 -0
  10. package/src/playwright/JwtBrowserAuth.js +0 -0
  11. package/src/playwright/fixture.js +0 -0
  12. package/src/playwright/global-setup.js +43 -0
  13. package/src/playwright/global-teardown.js +0 -0
  14. package/src/playwright/helpers/jwt-browser-auth.js +0 -0
  15. package/src/playwright/index.js +0 -0
  16. package/src/reporters/cypress/CypressReporter.js +49 -2
  17. package/src/reporters/cypress/UuidExtractor.js +0 -0
  18. package/src/reporters/cypress/index.js +0 -0
  19. package/src/reporters/jest/JestReporter.js +49 -2
  20. package/src/reporters/jest/UuidExtractor.js +0 -0
  21. package/src/reporters/jest/index.js +0 -0
  22. package/src/reporters/playwright/AppliqationReporter.js +424 -22
  23. package/src/reporters/playwright/helpers/DeviceOsDetector.js +0 -0
  24. package/src/reporters/playwright/helpers/UuidExtractor.js +0 -0
  25. package/src/reporters/playwright/index.d.ts +0 -0
  26. package/src/reporters/playwright/index.js +0 -0
  27. package/src/services/OrphanTestService.js +0 -0
  28. package/src/services/ResultService.js +158 -24
  29. package/src/services/RunMatrixService.js +16 -0
  30. package/src/services/TaggingService.js +44 -0
  31. package/src/utils/PayloadBuilder.js +0 -0
  32. package/src/utils/RunDataNormalizer.js +0 -0
  33. package/src/utils/UuidValidator.js +0 -0
  34. package/src/utils/errors.js +0 -0
  35. package/src/utils/index.js +0 -0
  36. package/src/utils/logger.js +0 -0
  37. package/src/utils/mapAppqUuid.js +0 -0
  38. package/src/utils/validator.js +0 -0
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
@@ -41,6 +41,8 @@ Before you begin, ensure you have:
41
41
 
42
42
  Follow these steps in order to integrate the SDK with your Playwright tests.
43
43
 
44
+ **📌 Important:** Appliqation reporting is **opt-in**. You must either set `APPQ_ENABLE=1` environment variable or add `-- --appq` flag to your test command to send results to Appliqation. Without enabling reporting, tests run normally but results are not reported.
45
+
44
46
  ### Step 1: Install the SDK
45
47
 
46
48
  Navigate to your Playwright project and install the SDK:
@@ -196,14 +198,46 @@ test('should display user profile', async ({ page }, testInfo) => {
196
198
 
197
199
  ### Step 5: Run Your Tests
198
200
 
199
- Run your Playwright tests as normal:
201
+ **IMPORTANT:** To enable Appliqation reporting, you must either set `APPQ_ENABLE=1` environment variable or use the `-- --appq` flag.
202
+
203
+ **Reporting DISABLED (Default):**
204
+ ```bash
205
+ # Tests run normally, but results are NOT sent to Appliqation
206
+ npx playwright test
207
+ ```
208
+
209
+ **Reporting ENABLED (Method 1 - Environment Variable - Recommended):**
210
+ ```bash
211
+ # Set APPQ_ENABLE to enable reporting (simpler approach)
212
+ APPQ_ENABLE=1 APPLIQATION_RUN_TITLE=yourruntitle APPLIQATION_ENVIRONMENT=test_env_name npx playwright test
213
+ ```
200
214
 
215
+ **Reporting ENABLED (Method 2 - CLI Flag):**
201
216
  ```bash
202
- APPLIQATION_RUN_TITLE=yourruntitle APPLIQATION_ENVIRONMENT=test_env_name npx playwright test
217
+ # Use -- --appq flag to enable reporting (requires separator)
218
+ APPLIQATION_RUN_TITLE=yourruntitle APPLIQATION_ENVIRONMENT=test_env_name npx playwright test -- --appq
219
+ ```
203
220
 
221
+ **Examples:**
222
+ ```bash
223
+ # Method 1: Using environment variable (recommended)
224
+ APPQ_ENABLE=1 npx playwright test
225
+ APPQ_ENABLE=1 npx playwright test tests/login.spec.js
226
+ APPQ_ENABLE=1 npx playwright test --project=chromium
227
+ APPQ_ENABLE=1 npx playwright test --headed
228
+
229
+ # Method 2: Using CLI flag (requires -- separator)
230
+ npx playwright test -- --appq
231
+ npx playwright test tests/login.spec.js -- --appq
232
+ npx playwright test --project=chromium -- --appq
233
+ npx playwright test --headed -- --appq
234
+
235
+ # Bonus: Set run title via CLI flag
236
+ npx playwright test -- --appq --appq_run_title="My Custom Run"
237
+ npx playwright test tests/login.spec.js -- --appq --appq_run_title="Login Tests Sprint 23"
204
238
  ```
205
239
 
206
- **What happens:**
240
+ **What happens when `--appq` flag is present:**
207
241
 
208
242
  1. **Global Setup Runs** (once before all tests):
209
243
  - Reads `.env` configuration
@@ -232,9 +266,208 @@ APPLIQATION_RUN_TITLE=yourruntitle APPLIQATION_ENVIRONMENT=test_env_name npx pla
232
266
  - Navigate to the scenario you configured
233
267
  - See test results in the run matrix!
234
268
 
269
+ **Remember:** Results only appear in Appliqation when you enable reporting with `APPQ_ENABLE=1` or `-- --appq` flag!
270
+
271
+ ---
272
+
273
+ ✅ **That's it!** Your tests are now integrated with Appliqation. Remember to enable reporting with `APPQ_ENABLE=1` or `-- --appq`!
274
+
275
+ ---
276
+
277
+ ## Enabling Appliqation Reporting (--appq Flag)
278
+
279
+ By default, Appliqation reporting is **DISABLED**. You must explicitly enable it by adding the `--appq` flag to your test command.
280
+
281
+ ### Why Opt-In?
282
+
283
+ This design allows you to:
284
+ - ✅ Run tests locally without creating runs in Appliqation
285
+ - ✅ Debug and develop tests without affecting production data
286
+ - ✅ Control when results are sent to Appliqation portal
287
+ - ✅ Avoid accidental test runs in your dashboard
288
+
289
+ ### How to Enable
290
+
291
+ You can enable Appliqation reporting in two ways:
292
+
293
+ #### Method 1: Environment Variable (Recommended - Simpler)
294
+
295
+ Set the `APPQ_ENABLE` environment variable to `1` or `true`:
296
+
297
+ ```bash
298
+ # Enable reporting with environment variable
299
+ APPQ_ENABLE=1 npx playwright test
300
+
301
+ # Works with any other flags
302
+ APPQ_ENABLE=1 npx playwright test tests/login.spec.js --headed --project=chromium
303
+
304
+ # Also works with APPLIQATION_ENABLE
305
+ APPLIQATION_ENABLE=true npx playwright test
306
+ ```
307
+
308
+ #### Method 2: CLI Flag (Requires `--` Separator)
309
+
310
+ Add `--appq` flag after the `--` separator:
311
+
312
+ ```bash
313
+ # Enable reporting with CLI flag (note the -- separator)
314
+ npx playwright test -- --appq
315
+
316
+ # Works with any other flags
317
+ npx playwright test tests/login.spec.js --headed --project=chromium -- --appq
318
+ ```
319
+
320
+ **Note:** The `--` separator is required because Playwright doesn't recognize custom flags directly. The environment variable method is simpler and doesn't require the separator.
321
+
322
+ ### Setting Run Title via CLI
323
+
324
+ You can also specify the run title directly in the command line using the `--appq_run_title` flag:
325
+
326
+ ```bash
327
+ # Set run title via CLI flag
328
+ npx playwright test -- --appq --appq_run_title="My Custom Run Title"
329
+
330
+ # Works with other flags
331
+ npx playwright test tests/login.spec.js --headed --project=chromium -- --appq --appq_run_title="Login Tests"
332
+
333
+ # With quotes for titles containing spaces
334
+ npx playwright test -- --appq --appq_run_title="Regression Suite - Sprint 23"
335
+ ```
336
+
337
+ **Priority Order for Run Title:**
338
+ 1. Config file `title` option (if specified)
339
+ 2. CLI flag `--appq_run_title` (new!)
340
+ 3. Environment variable `APPLIQATION_RUN_TITLE`
341
+ 4. Auto-generated timestamp (default)
342
+
343
+ **Examples:**
344
+ ```bash
345
+ # Method 1: Environment variable
346
+ APPLIQATION_RUN_TITLE="My Run" npx playwright test -- --appq
347
+
348
+ # Method 2: CLI flag (overrides environment variable)
349
+ APPLIQATION_RUN_TITLE="Old Title" npx playwright test -- --appq --appq_run_title="New Title"
350
+ # Result: Run title will be "New Title"
351
+
352
+ # Method 3: Combined usage
353
+ npx playwright test -- --appq --appq_run_title="Sprint 23 Regression"
354
+ ```
355
+
356
+ ### What Happens When Reporting is Disabled
357
+
358
+ When you run tests **without** enabling reporting (no flag, no env var):
359
+ - ✅ Tests execute normally
360
+ - ✅ Execution summary file is still created
361
+ - ❌ No run is created in Appliqation
362
+ - ❌ No results are sent to Appliqation portal
363
+ - ℹ️ Console shows: "Appliqation reporting disabled: Add --appq flag to send results"
364
+
365
+ **Example:**
366
+ ```bash
367
+ # Reporting disabled - no results sent to Appliqation
368
+ npx playwright test
369
+ ```
370
+
371
+ ### What Happens When Reporting is Enabled
372
+
373
+ When you run tests **with** reporting enabled (using flag or env var):
374
+ - ✅ Tests execute normally
375
+ - ✅ Run matrix created in Appliqation
376
+ - ✅ Results sent to Appliqation portal
377
+ - ✅ Execution summary file created
378
+ - ✅ Console shows: "Appliqation reporting enabled: Results will be sent to Appliqation portal"
379
+
380
+ **Examples:**
381
+ ```bash
382
+ # Reporting enabled with environment variable
383
+ APPQ_ENABLE=1 npx playwright test
384
+
385
+ # Reporting enabled with CLI flag
386
+ npx playwright test -- --appq
387
+ ```
388
+
235
389
  ---
236
390
 
237
- **That's it!** Your tests are now integrated with Appliqation.
391
+ ## Execution Summary Files
392
+
393
+ After each test run, the SDK automatically creates a timestamped summary file with comprehensive results.
394
+
395
+ **Location:** `test-results/AppQ_Execution_Summary/`
396
+
397
+ **Filename Format:** `{run_title}_2025-01-21_14-30-45.txt`
398
+
399
+ **What's Included:**
400
+ - ✅ Execution time (start, end, duration)
401
+ - ✅ Test counts (submitted, accepted, rejected, passed, failed, skipped)
402
+ - ✅ Run IDs for all created matrices
403
+ - ✅ Detailed error information (duplicates, orphans, backend rejections)
404
+ - ✅ Complete ASCII table (same as terminal output)
405
+
406
+ **Example:**
407
+ ```
408
+ test-results/
409
+ └── AppQ_Execution_Summary/
410
+ ├── My_Test_Run_2025-01-21_09-30-15.txt
411
+ ├── My_Test_Run_2025-01-21_14-45-30.txt
412
+ └── Regression_Suite_2025-01-22_08-00-00.txt
413
+ ```
414
+
415
+ **Features:**
416
+ - Always enabled automatically (no configuration needed)
417
+ - Each run creates a NEW file (never overwrites)
418
+ - If file writing fails, tests continue normally (non-blocking)
419
+
420
+ **Sample File Content:**
421
+ ```
422
+ ═══════════════════════════════════════════════════════════
423
+ APPLIQATION TEST EXECUTION SUMMARY
424
+ ═══════════════════════════════════════════════════════════
425
+
426
+ EXECUTION METADATA:
427
+ ─────────────────────────────────────────────────────────
428
+ Start Time: 2025-01-21T14:30:15.123Z
429
+ End Time: 2025-01-21T14:35:45.456Z
430
+ Duration: 5m 30s
431
+ Run Title: My_Test_Run
432
+
433
+ ╔═══════════════════════════════════════════════════════════╗
434
+ ║ Appliqation Test Results Summary ║
435
+ ╠═══════════════════════════════════════════════════════════╣
436
+ ║ Submitted to Backend: ║
437
+ ║ Total Submitted: 10 ║
438
+ ║ ✅ Accepted: 8 ║
439
+ ║ ❌ Rejected: 2 ║
440
+ ║ ║
441
+ ║ Test Execution Results (Playwright): ║
442
+ ║ Passed: 8 ║
443
+ ║ Failed: 0 ║
444
+ ║ Skipped: 0 ║
445
+ ║ ║
446
+ ║ Not Submitted: ║
447
+ ║ Orphan (No UUID): 3 ║
448
+ ║ Duplicates: 2 ║
449
+ ╠═══════════════════════════════════════════════════════════╣
450
+ ║ Run Matrices Created: 2 ║
451
+ ║ Desktop-Windows : run_abc123_1234567890 ║
452
+ ║ Desktop-Linux : run_xyz789_0987654321 ║
453
+ ╚═══════════════════════════════════════════════════════════╝
454
+
455
+ DETAILED ERRORS & WARNINGS:
456
+ ═══════════════════════════════════════════════════════════
457
+ [Duplicate UUIDs, Orphan Tests, and Backend Rejections details...]
458
+ ```
459
+
460
+ ---
461
+
462
+ ## Auto-tag Accepted Tests
463
+
464
+ After a test is automated, the SDK can tag its UUID (default tag: `Appq_automated`) for accepted results only. Tagging is fire-and-forget: failures are logged as warnings and never fail your run.
465
+
466
+ - Enabled by default when Appq is enabled.
467
+ - Overrides:
468
+ - Tag name: `APPLIQATION_TAG_NAME=MyTag`
469
+ - Endpoint (if customized): `APPLIQATION_TAG_ENDPOINT=/api/automation/testcase/tag`
470
+ - Works for both batch and single submissions; backend-rejected results are skipped automatically.
238
471
 
239
472
  ---
240
473
 
@@ -649,14 +882,21 @@ const appliqationConfig = {
649
882
 
650
883
  **Possible causes:**
651
884
 
652
- 1. **Orphan tests** - Tests don't have `mapAppqUuid()` calls
885
+ 1. **Reporting not enabled** - Missing `APPQ_ENABLE` env var or `--appq` flag (MOST COMMON!)
886
+ - **Fix (Method 1 - Recommended):** Set `APPQ_ENABLE=1` environment variable
887
+ - Example: `APPQ_ENABLE=1 npx playwright test`
888
+ - **Fix (Method 2):** Add `-- --appq` flag to your test command
889
+ - Example: `npx playwright test -- --appq`
890
+ - Check console output for: "Appliqation reporting disabled"
891
+
892
+ 2. **Orphan tests** - Tests don't have `mapAppqUuid()` calls
653
893
  - **Fix:** Add UUID mapping to all tests
654
894
  - Enable `logOrphans: true` to see which tests are orphans
655
895
 
656
- 2. **API key invalid** - Authentication failed
896
+ 3. **API key invalid** - Authentication failed
657
897
  - **Fix:** Regenerate API key from portal
658
898
 
659
- 3. **Network issues** - Portal unreachable
899
+ 4. **Network issues** - Portal unreachable
660
900
  - **Fix:** Check `TEST_APP_URL` is accessible
661
901
 
662
902
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appliqation/automation-sdk",
3
- "version": "2.1.11",
3
+ "version": "2.2.0",
4
4
  "description": "Appliqation Automation SDK with API key authentication, custom run titles, and framework-specific reporters",
5
5
  "main": "src/index.js",
6
6
  "types": "src/index.d.ts",
@@ -112,7 +112,7 @@ class AppliqationClient {
112
112
 
113
113
  // Initialize services
114
114
  this.runMatrix = new RunMatrixService(this.http, this.config);
115
- this.results = new ResultService(this.http);
115
+ this.results = new ResultService(this.http, this.config);
116
116
  this.orphans = new OrphanTestService(this.http);
117
117
 
118
118
  // Track current run context
package/src/constants.js CHANGED
File without changes
File without changes
File without changes
package/src/index.d.ts CHANGED
File without changes
package/src/index.js CHANGED
File without changes
File without changes
File without changes
@@ -29,6 +29,43 @@ const fs = require('fs');
29
29
  const path = require('path');
30
30
  const { DEFAULT_APPLIQATION_BASE_URL } = require('../constants');
31
31
 
32
+ function toBoolean(value) {
33
+ if (value === undefined || value === null) return undefined;
34
+ if (typeof value === 'boolean') return value;
35
+ const normalized = String(value).trim().toLowerCase();
36
+ if (['1', 'true', 'yes', 'on'].includes(normalized)) return true;
37
+ if (['0', 'false', 'no', 'off'].includes(normalized)) return false;
38
+ return undefined;
39
+ }
40
+
41
+ function parseCliEnableFlag() {
42
+ const argv = process.argv || [];
43
+ for (let i = 0; i < argv.length; i++) {
44
+ const arg = argv[i];
45
+ if (arg.startsWith('--appq=')) {
46
+ return toBoolean(arg.split('=')[1]);
47
+ }
48
+ if (arg === '--appq') {
49
+ return true;
50
+ }
51
+ if (arg.startsWith('--enable-appq=')) {
52
+ return toBoolean(arg.split('=')[1]);
53
+ }
54
+ if (arg === '--enable-appq') {
55
+ return true;
56
+ }
57
+ }
58
+ return undefined;
59
+ }
60
+
61
+ function resolveEnableAppq(config) {
62
+ const cliValue = parseCliEnableFlag();
63
+ const envValue = process.env.APPLIQATION_ENABLE ?? process.env.APPQ ?? process.env.APPLIQATION_APPQ;
64
+ const configValue = config?.enableAppq ?? config?.options?.enableAppq;
65
+ const resolved = toBoolean(configValue) ?? toBoolean(cliValue) ?? toBoolean(envValue);
66
+ return resolved !== undefined ? resolved : true;
67
+ }
68
+
32
69
  /**
33
70
  * Setup JWT-based browser authentication
34
71
  *
@@ -40,11 +77,17 @@ async function globalSetup(config) {
40
77
 
41
78
  // Extract SDK configuration from reporter config or use env
42
79
  const sdkConfig = extractSDKConfig(config);
80
+ sdkConfig.enableAppq = resolveEnableAppq(sdkConfig);
43
81
 
44
82
  // Display startup information
45
83
  console.log(`🌍 Environment: ${sdkConfig.environment || 'Not specified'}`);
46
84
  console.log(`🔗 Test App URL: ${sdkConfig.appUrl || 'Not specified'}`);
47
85
 
86
+ if (sdkConfig.enableAppq === false) {
87
+ console.log('⚠️ Appq disabled via flag. Skipping JWT setup and backend calls.\n');
88
+ return;
89
+ }
90
+
48
91
  // Show Run ID and Timestamp only in DEBUG mode
49
92
  if (process.env.LOG_LEVEL === 'DEBUG') {
50
93
  const crypto = require('crypto');
File without changes
File without changes
File without changes
@@ -2,6 +2,43 @@ const AppliqationClient = require('../../AppliqationClient');
2
2
  const UuidExtractor = require('./UuidExtractor');
3
3
  const logger = require('../../utils/logger');
4
4
 
5
+ function toBoolean(value) {
6
+ if (value === undefined || value === null) return undefined;
7
+ if (typeof value === 'boolean') return value;
8
+ const normalized = String(value).trim().toLowerCase();
9
+ if (['1', 'true', 'yes', 'on'].includes(normalized)) return true;
10
+ if (['0', 'false', 'no', 'off'].includes(normalized)) return false;
11
+ return undefined;
12
+ }
13
+
14
+ function parseCliEnableFlag() {
15
+ const argv = process.argv || [];
16
+ for (let i = 0; i < argv.length; i++) {
17
+ const arg = argv[i];
18
+ if (arg.startsWith('--appq=')) {
19
+ return toBoolean(arg.split('=')[1]);
20
+ }
21
+ if (arg === '--appq') {
22
+ return true;
23
+ }
24
+ if (arg.startsWith('--enable-appq=')) {
25
+ return toBoolean(arg.split('=')[1]);
26
+ }
27
+ if (arg === '--enable-appq') {
28
+ return true;
29
+ }
30
+ }
31
+ return undefined;
32
+ }
33
+
34
+ function resolveEnableAppq(config) {
35
+ const cliValue = parseCliEnableFlag();
36
+ const envValue = process.env.APPLIQATION_ENABLE ?? process.env.APPQ ?? process.env.APPLIQATION_APPQ;
37
+ const configValue = config?.enableAppq ?? config?.options?.enableAppq;
38
+ const resolved = toBoolean(configValue) ?? toBoolean(cliValue) ?? toBoolean(envValue);
39
+ return resolved !== undefined ? resolved : true;
40
+ }
41
+
5
42
  /**
6
43
  * Appliqation Reporter for Cypress
7
44
  *
@@ -39,7 +76,8 @@ class CypressReporter {
39
76
  title: config.title || process.env.APPLIQATION_RUN_TITLE,
40
77
  autoCreateRun: config.autoCreateRun !== false,
41
78
  logLevel: config.logLevel || 'info',
42
- submitOrphans: config.submitOrphans !== false
79
+ submitOrphans: config.submitOrphans !== false,
80
+ enableAppq: resolveEnableAppq(config)
43
81
  };
44
82
 
45
83
  // Validate required config
@@ -55,10 +93,15 @@ class CypressReporter {
55
93
  projectKey: this.config.projectKey,
56
94
  title: this.config.title,
57
95
  options: {
58
- logLevel: this.config.logLevel
96
+ logLevel: this.config.logLevel,
97
+ enableAppq: this.config.enableAppq
59
98
  }
60
99
  });
61
100
 
101
+ if (this.config.enableAppq === false) {
102
+ logger.warn('Appq disabled via flag. Runs/results will not be sent to Appliqation.');
103
+ }
104
+
62
105
  // Test result storage
63
106
  this.testResults = [];
64
107
  this.orphanTests = [];
@@ -360,6 +403,10 @@ class CypressReporter {
360
403
  * Validate configuration
361
404
  */
362
405
  validateConfig() {
406
+ if (this.config.enableAppq === false) {
407
+ return;
408
+ }
409
+
363
410
  const required = ['baseUrl', 'apiKey', 'projectKey'];
364
411
  const missing = required.filter(key => !this.config[key]);
365
412
 
File without changes
File without changes
@@ -2,6 +2,43 @@ const AppliqationClient = require('../../AppliqationClient');
2
2
  const UuidExtractor = require('./UuidExtractor');
3
3
  const logger = require('../../utils/logger');
4
4
 
5
+ function toBoolean(value) {
6
+ if (value === undefined || value === null) return undefined;
7
+ if (typeof value === 'boolean') return value;
8
+ const normalized = String(value).trim().toLowerCase();
9
+ if (['1', 'true', 'yes', 'on'].includes(normalized)) return true;
10
+ if (['0', 'false', 'no', 'off'].includes(normalized)) return false;
11
+ return undefined;
12
+ }
13
+
14
+ function parseCliEnableFlag() {
15
+ const argv = process.argv || [];
16
+ for (let i = 0; i < argv.length; i++) {
17
+ const arg = argv[i];
18
+ if (arg.startsWith('--appq=')) {
19
+ return toBoolean(arg.split('=')[1]);
20
+ }
21
+ if (arg === '--appq') {
22
+ return true;
23
+ }
24
+ if (arg.startsWith('--enable-appq=')) {
25
+ return toBoolean(arg.split('=')[1]);
26
+ }
27
+ if (arg === '--enable-appq') {
28
+ return true;
29
+ }
30
+ }
31
+ return undefined;
32
+ }
33
+
34
+ function resolveEnableAppq(config) {
35
+ const cliValue = parseCliEnableFlag();
36
+ const envValue = process.env.APPLIQATION_ENABLE ?? process.env.APPQ ?? process.env.APPLIQATION_APPQ;
37
+ const configValue = config?.enableAppq ?? config?.options?.enableAppq;
38
+ const resolved = toBoolean(configValue) ?? toBoolean(cliValue) ?? toBoolean(envValue);
39
+ return resolved !== undefined ? resolved : true;
40
+ }
41
+
5
42
  /**
6
43
  * Appliqation Reporter for Jest
7
44
  *
@@ -39,7 +76,8 @@ class JestReporter {
39
76
  title: options.title || process.env.APPLIQATION_RUN_TITLE,
40
77
  autoCreateRun: options.autoCreateRun !== false,
41
78
  logLevel: options.logLevel || 'info',
42
- submitOrphans: options.submitOrphans !== false
79
+ submitOrphans: options.submitOrphans !== false,
80
+ enableAppq: resolveEnableAppq(options)
43
81
  };
44
82
 
45
83
  // Validate required config
@@ -55,10 +93,15 @@ class JestReporter {
55
93
  projectKey: this.config.projectKey,
56
94
  title: this.config.title,
57
95
  options: {
58
- logLevel: this.config.logLevel
96
+ logLevel: this.config.logLevel,
97
+ enableAppq: this.config.enableAppq
59
98
  }
60
99
  });
61
100
 
101
+ if (this.config.enableAppq === false) {
102
+ logger.warn('Appq disabled via flag. Runs/results will not be sent to Appliqation.');
103
+ }
104
+
62
105
  // Test result storage
63
106
  this.testResults = [];
64
107
  this.orphanTests = [];
@@ -339,6 +382,10 @@ class JestReporter {
339
382
  * Validate configuration
340
383
  */
341
384
  validateConfig() {
385
+ if (this.config.enableAppq === false) {
386
+ return;
387
+ }
388
+
342
389
  const required = ['baseUrl', 'apiKey', 'projectKey'];
343
390
  const missing = required.filter(key => !this.config[key]);
344
391
 
File without changes
File without changes