Adds debugging logs to Playwright test execution

Adds debugging logs to the Playwright test execution within the Docker container to aid in diagnosing issues with report generation and merging. These logs provide insights into directory contents and the state of the environment.
This commit is contained in:
maguire-arman 2025-07-10 14:22:15 -04:00
parent 36fa8fb3f3
commit 99ddab867f

View file

@ -247,22 +247,26 @@ jobs:
export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}" export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}"
export JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" export JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER"
container_id=$(docker create \ container_id=$(docker create \
--ipc=host \ --ipc=host \
--env-file "${{ parameters.envFileName }}" \ --env-file "${{ parameters.envFileName }}" \
${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \
bash -c " bash -c "
echo 'Moving Playwright reports out of subfolders...' echo 'Moving Playwright reports out of subfolders...'
find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \; find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-reports/ \;
echo 'Merging reports...' echo 'Merging reports...'
PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports PLAYWRIGHT_JUNIT_OUTPUT_DIR='/app/test-results' PLAYWRIGHT_JUNIT_OUTPUT_NAME='junit_results.xml' npx --prefix $PLAYWRIGHT_PATH playwright merge-reports ./playwright-reports
echo 'Contents of ortoni-report:' && ls ./ortoni-report echo 'Contents of ortoni-report:' && ls ./ortoni-report
echo 'Current dir: ' && pwd echo 'Current dir: ' && pwd
echo 'Contents of current dir: ' && ls echo 'Contents of current dir: ' && ls
echo 'Contents of /app/test-results' && ls /app/test-results echo 'Contents of /app/test-results' && ls /app/test-results
" echo 'Contents of $PLAYWRIGHT_PATH' && ls $PLAYWRIGHT_PATH
) echo 'Contents of $PLAYWRIGHT_PATH/ortoni-report' && ls '$PLAYWRIGHT_PATH/ortoni-report'
echo 'Contents of $PLAYWRIGHT_PATH/test-results' && ls '$PLAYWRIGHT_PATH/test-results'
echo 'Contents of $PLAYWRIGHT_PATH/app' && ls '$PLAYWRIGHT_PATH/app'
"
)
# Start container and stream logs # Start container and stream logs
echo "Starting merge" echo "Starting merge"