mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-03-30 10:16:10 +00:00
18 lines
No EOL
557 B
Bash
Executable file
18 lines
No EOL
557 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# Script to profile Playwright test performance
|
|
|
|
echo "Running Playwright tests with timing information..."
|
|
|
|
# Set environment variables for better performance
|
|
export PWTEST_SKIP_TEST_OUTPUT=1
|
|
export NODE_ENV=test
|
|
|
|
# Run tests with custom reporter that shows timing
|
|
pnpm exec playwright test --reporter=json | jq -r '
|
|
.suites[].suites[]?.specs[]? |
|
|
select(.tests[0].results[0].duration != null) |
|
|
"\(.tests[0].results[0].duration)ms - \(.file):\(.line) - \(.title)"
|
|
' | sort -rn | head -20
|
|
|
|
echo -e "\nTop 20 slowest tests listed above." |