Skip to content

Commit 9b02d70

Browse files
awahab07elasticmachine
authored andcommitted
[Scout] Upload screenshots for failed tests to buildkite artifacts (elastic#236613)
## Summary While investigating a test failure, I've found that Scout doesn't upload captured screenshots for failed tests to Buildkite Artifacts. ### Before For example for the following failure: <img width="3456" height="1924" alt="image" src="https://github.com/user-attachments/assets/c947c834-dd67-465e-8f09-fa5a1b356ede" /> Playwright did capture screenshot ```shell proc [playwright] attachment #1: screenshot (image/png) ────────────────────────────────────────────────────────── --   | proc [playwright] x-pack/platform/plugins/shared/streams_app/test/scout/ui/.scout/test-artifacts/data_management-data_proce-582f5-during-a-processor-creation-local/test-failed-1.png   | proc [playwright] ──────────────────────────────────────────────────────────────────────────────────────────────── ``` but it's not available under job's **Artifacts** <img width="3456" height="1910" alt="image" src="https://github.com/user-attachments/assets/027e16fb-7a08-4d7a-bd74-804690263fae" /> ### After #### **Failing test** (see [build](https://buildkite.com/elastic/kibana-pull-request/builds/344414)) <img width="3442" height="1922" alt="image" src="https://github.com/user-attachments/assets/558a6a10-f2b0-4491-a54d-cef89b827745" /> <img width="3442" height="1916" alt="image" src="https://github.com/user-attachments/assets/0c1e080d-de40-4a7c-aff3-cab93d4a64c0" /> #### **Passing test** <img width="3456" height="1906" alt="image" src="https://github.com/user-attachments/assets/5e4f0171-60a0-45b4-a1ab-39fb94f935ce" /> --------- Co-authored-by: Elastic Machine <[email protected]>
1 parent 3342b20 commit 9b02d70

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.buildkite/scripts/lifecycle/post_command.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ IS_TEST_EXECUTION_STEP="$(buildkite-agent meta-data get "${BUILDKITE_JOB_ID}_is_
1010

1111
if [[ "$IS_TEST_EXECUTION_STEP" == "true" ]]; then
1212
echo "--- Upload Artifacts"
13+
buildkite-agent artifact upload '**/.scout/test-artifacts/**/*.png'
1314
buildkite-agent artifact upload '.scout/reports/scout-playwright-test-failures-*/**/*'
1415
buildkite-agent artifact upload 'target/junit/**/*'
1516
buildkite-agent artifact upload 'target/kibana-coverage/jest/**/*'

0 commit comments

Comments
 (0)