@testomatio/reporter 2.7.3-beta.3.allure → 2.7.4-beta.allure-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.
@@ -441,16 +441,21 @@ class AllureReader {
441
441
  await this.uploadArtifacts();
442
442
  this.calculateStats();
443
443
  this.fetchSourceCode();
444
- const dataString = {
445
- ...this.stats,
444
+ this.pipes = this.pipes || (await this.pipesPromise);
445
+ // Upload tests individually via addTest (like XML reader does)
446
+ // so each pipe processes them through its own pipeline
447
+ for (const test of this._tests) {
448
+ await Promise.all(this.pipes.map(p => p.addTest(test)));
449
+ }
450
+ // Flush any batched tests
451
+ await Promise.all(this.pipes.map(p => p.sync()));
452
+ debug('Uploaded %d tests, finishing run', this._tests.length);
453
+ const finishData = {
446
454
  api_key: this.requestParams.apiKey,
447
455
  status: 'finished',
448
456
  duration: this.stats.duration,
449
- tests: this._tests,
450
457
  };
451
- debug('Uploading data', dataString);
452
- this.pipes = this.pipes || (await this.pipesPromise);
453
- return Promise.all(this.pipes.map(p => p.finishRun(dataString)));
458
+ return Promise.all(this.pipes.map(p => p.finishRun(finishData)));
454
459
  }
455
460
  }
456
461
  module.exports = AllureReader;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testomatio/reporter",
3
- "version": "2.7.3-beta.3.allure",
3
+ "version": "2.7.4-beta.allure-1",
4
4
  "description": "Testomatio Reporter Client",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -514,18 +514,26 @@ class AllureReader {
514
514
  this.calculateStats();
515
515
  this.fetchSourceCode();
516
516
 
517
- const dataString = {
518
- ...this.stats,
517
+ this.pipes = this.pipes || (await this.pipesPromise);
518
+
519
+ // Upload tests individually via addTest (like XML reader does)
520
+ // so each pipe processes them through its own pipeline
521
+ for (const test of this._tests) {
522
+ await Promise.all(this.pipes.map(p => p.addTest(test)));
523
+ }
524
+
525
+ // Flush any batched tests
526
+ await Promise.all(this.pipes.map(p => p.sync()));
527
+
528
+ debug('Uploaded %d tests, finishing run', this._tests.length);
529
+
530
+ const finishData = {
519
531
  api_key: this.requestParams.apiKey,
520
532
  status: 'finished',
521
533
  duration: this.stats.duration,
522
- tests: this._tests,
523
534
  };
524
535
 
525
- debug('Uploading data', dataString);
526
-
527
- this.pipes = this.pipes || (await this.pipesPromise);
528
- return Promise.all(this.pipes.map(p => p.finishRun(dataString)));
536
+ return Promise.all(this.pipes.map(p => p.finishRun(finishData)));
529
537
  }
530
538
  }
531
539