<h3 dir="auto">System info</h3>
<ul dir="auto">
<li>Playwright Version: 1.34.3</li>
<li>Operating System: Mac</li>
<li>Browser: All</li>
<li>Other info:</li>
</ul>
<h3 dir="auto">Source code</h3>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I provided exact source code that allows reproducing the issue locally.</li>
</ul>




<p dir="auto"><strong>Link to the GitHub repository with the repro</strong></p>
<p dir="auto"><a href="https://github.com/Nav-2d/pw-codegen-repro">bug-repo</a></p>
<p dir="auto"><strong>Steps</strong></p>
<ul dir="auto">
<li>Run the script <code class="notranslate">npm run all</code>. This runs the tests in parallel in two shards</li>
</ul>
<p dir="auto"><strong>Expected</strong></p>
<p dir="auto">The global teardown should run only once similar to global setup</p>
<p dir="auto"><strong>Actual</strong></p>
<p dir="auto">The global teardown runs in both the shards.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running 4 tests using 1 worker, shard 2 of 2


Running 4 tests using 1 worker, shard 1 of 2

     1 [setup] › global.setup.ts:3:5 › run global setup
  ✓  1 [setup] › global.setup.ts:3:5 › run global setup (1.6s)
  ✓  1 [setup] › global.setup.ts:3:5 › run global setup (1.9s)
**global setup ran** //Global setup runs once
     2 [webkit] › example.spec.ts:4:7 › has title @smoke › has title
  ✓  2 [webkit] › example.spec.ts:4:7 › has title @smoke › has title (1.0s)
  ✓  2 [chromium] › example.spec.ts:4:7 › has title @smoke › has title (1.6s)
     3 [chromium] › example.spec.ts:9:7 › has title @smoke › has 12123
  ✓  3 [chromium] › example.spec.ts:9:7 › has title @smoke › has 12123 (809ms)
  ✓  4 [teardown] › global.teardown.ts:3:5 › run global teardown (1.6s)
**global teardown ran** //Global teardown runs on one shard

  ✓  4 [teardown] › global.teardown.ts:3:5 › run global teardown (1.4s)
**global teardown ran** //Global teardown runs on another shard
 "><pre class="notranslate"><code class="notranslate">Running 4 tests using 1 worker, shard 2 of 2


Running 4 tests using 1 worker, shard 1 of 2

     1 [setup] › global.setup.ts:3:5 › run global setup
  ✓  1 [setup] › global.setup.ts:3:5 › run global setup (1.6s)
  ✓  1 [setup] › global.setup.ts:3:5 › run global setup (1.9s)
**global setup ran** //Global setup runs once
     2 [webkit] › example.spec.ts:4:7 › has title @smoke › has title
  ✓  2 [webkit] › example.spec.ts:4:7 › has title @smoke › has title (1.0s)
  ✓  2 [chromium] › example.spec.ts:4:7 › has title @smoke › has title (1.6s)
     3 [chromium] › example.spec.ts:9:7 › has title @smoke › has 12123
  ✓  3 [chromium] › example.spec.ts:9:7 › has title @smoke › has 12123 (809ms)
  ✓  4 [teardown] › global.teardown.ts:3:5 › run global teardown (1.6s)
**global teardown ran** //Global teardown runs on one shard

  ✓  4 [teardown] › global.teardown.ts:3:5 › run global teardown (1.4s)
**global teardown ran** //Global teardown runs on another shard
 
</code></pre></div>
<p dir="auto">Hello,<br>
I am using Playwright in JavaScript and due to project requirements, the parallelization is done by grouping and using npm concurrent (to avoid double user sessions, can't control test data)</p>
<p dir="auto">Locally when I run the suite I get served two reports but at the end have only one index.html in my playwright-report, but when this is run on Jenkins, the htmlpublisher plugin serves everything within playwright-report and it only contains the last report, as the new index.html overrides the old one.</p>
<p dir="auto">So I am looking to generate separate reports per concurrent script run.</p>
<p dir="auto">I've been researching this a lot today and can't seem to find a solution:<br>
tried using just the CLI parameters --output="reports-uk" and in the other npm script --output="reports-de" -&gt; what happens is the webm files usually located in test-results are generated in these new folders, but then the report is still one index.html from playwright-report</p>
<p dir="auto">I tried using <code class="notranslate">outputPath</code> in my configs reporter property as: process.env.OUTPUT_PATH || 'playwright-local/report.html',<br>
Then in my scripts I have:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  &quot;scripts&quot;: {
    &quot;test&quot;: &quot;cross-env test_env=staging npx playwright test&quot;,
    &quot;run-de&quot;: &quot;cross-env test_env=%environment_name% OUTPUT_PATH=playwright-report/de npx playwright test --project=de %scope%&quot;,
    &quot;run-uk&quot;: &quot;cross-env test_env=%environment_name% OUTPUT_PATH=playwright-report/uk npx playwright test --project=uk %scope%&quot;,
    &quot;execute-all&quot;: &quot;concurrently %runCountries%&quot;
  },  "><pre class="notranslate"><code class="notranslate">  "scripts": {
    "test": "cross-env test_env=staging npx playwright test",
    "run-de": "cross-env test_env=%environment_name% OUTPUT_PATH=playwright-report/de npx playwright test --project=de %scope%",
    "run-uk": "cross-env test_env=%environment_name% OUTPUT_PATH=playwright-report/uk npx playwright test --project=uk %scope%",
    "execute-all": "concurrently %runCountries%"
  },  
</code></pre></div>
<p dir="auto">But I still only get one report named index.html at playwright-report folder.</p>
<p dir="auto">Since documentation is a little bit scarce on the html reporter, is there a way for me to make the 2 reports have different names over CLI and have them in one folder? Whatever I do I always end up with index.html somehow.<br>
If not, how could I specify two folders for reports that would each have one of index.html so as not to override the reports?</p>