From 99ddab867f85032713f574ebdb83da090a875b8e Mon Sep 17 00:00:00 2001 From: maguire-arman Date: Thu, 10 Jul 2025 14:22:15 -0400 Subject: [PATCH] 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. --- temp/playwright-test.yml | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/temp/playwright-test.yml b/temp/playwright-test.yml index a27e38441..460b41735 100644 --- a/temp/playwright-test.yml +++ b/temp/playwright-test.yml @@ -247,23 +247,27 @@ jobs: export PLAYWRIGHT_PATH="${{ parameters.playwrightTestsPath }}" - export JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" - container_id=$(docker create \ - --ipc=host \ - --env-file "${{ parameters.envFileName }}" \ - ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ - bash -c " - echo 'Moving Playwright reports out of subfolders...' - find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-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 - echo 'Contents of ortoni-report:' && ls ./ortoni-report - echo 'Current dir: ' && pwd - echo 'Contents of current dir: ' && ls - echo 'Contents of /app/test-results' && ls /app/test-results - " - ) - + export JIRA_CARD_NUMBER="$JIRA_CARD_NUMBER" + container_id=$(docker create \ + --ipc=host \ + --env-file "${{ parameters.envFileName }}" \ + ${{ parameters.dockerImageName }}:${{ parameters.imageTag }} \ + bash -c " + echo 'Moving Playwright reports out of subfolders...' + find ./playwright-reports/ -mindepth 2 -type f -exec mv {} ./playwright-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 + echo 'Contents of ortoni-report:' && ls ./ortoni-report + echo 'Current dir: ' && pwd + echo 'Contents of current dir: ' && ls + 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 echo "Starting merge" docker start -a $container_id