Support --profile when running tests in parallel (#1795)

* feat: support profiling parallel tests

* test: preserve success snapshot totals

* test: preserve visual suite snapshot

* fix: stabilize checks on pull requests

* fix: align TIA fixture branch resolution

* chore: keep parallel profile changes scoped

* fix: align TIA fixture branch resolution

* Revert unrelated TIA branch fallback change

---------

Co-authored-by: Punyapal Shah <53343069+MrPunyapal@users.noreply.github.com>
This commit is contained in:
Daniel Polito
2026-11-14 13:03:34 -03:00
committed by GitHub
parent a6b81dbd73
commit 89cdbd5bc9
4 changed files with 141 additions and 8 deletions
+7 -1
View File
@@ -19,12 +19,18 @@ $run = function (): ?string {
test('parallel', function () use ($run): void {
$output = $run('--exclude-group=integration');
$output = implode("\n", array_slice(explode("\n", (string) $output), -10));
$profileOutput = $run('tests/Fixtures/Suites/SuccessOnly.php', '--profile');
$expected = '2 deprecated, 4 warnings, 5 incomplete, 3 notices, 40 todos, 29 skipped, 1636 passed (3623 assertions)';
expect($output)
->toContain("Tests: {$expected}")
->toContain('Parallel: 3 processes');
->and(
str_contains($output, 'Parallel: 3 processes')
&& str_contains((string) $profileOutput, 'Top 10 slowest tests:')
&& str_contains((string) $profileOutput, 'can pass with comparison')
&& str_contains((string) $profileOutput, 'can also pass'),
)->toBeTrue();
})->skipOnWindows();
test('a parallel test can extend another test with same name', function () use ($run): void {