You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Synthetics agent by default stores the screenshots and other attachments in the synthetics specific project folder path which is under .synthetics and does not expose any API for getting these screenshots and videos if captured via PW outDir folder. We would like to add support for the outputDIr option and also help users gather these written paths via the test results.
Proposal
outputDir Option
Users should be able to specific the outputDir path to the Synthetics runner via the config option/CLI flag etc to store all the screenshots/videos. If not specified, the runner will default to the previous folder .synthetics and store them under each test for backwards compatability
exportdefault{outputDir: "./test-results"}
Attachments Results
The Stored results from the test run, be it screenshots, videos, trace should be added to the Test results exporter interface where the users can retrive these information on demand. Our reporters should also use the TestResult/JourneyEnd interface and act on these screenshots instead of directly fetching it from .synthetics folder.
onJourneyEnd(result=>{result.attachments.forEach(attachment=>{console.log(a.name)// name of the attachmentconsole.log(a.contentType)// Content type of this attachment - ex: 'application/json' or 'image/png'.console.log(a.path)// path on the filesystem to the attached file.console.log(a.body)// attachment body used instead of a file.})});
Summary
Synthetics agent by default stores the screenshots and other attachments in the synthetics specific project folder path which is under
.synthetics
and does not expose any API for getting these screenshots and videos if captured via PW outDir folder. We would like to add support for the outputDIr option and also help users gather these written paths via the test results.Proposal
outputDir Option
Users should be able to specific the
outputDir
path to the Synthetics runner via the config option/CLI flag etc to store all the screenshots/videos. If not specified, the runner will default to the previous folder.synthetics
and store them under each test for backwards compatabilityAttachments Results
The Stored results from the test run, be it screenshots, videos, trace should be added to the Test results exporter interface where the users can retrive these information on demand. Our reporters should also use the
TestResult/JourneyEnd
interface and act on these screenshots instead of directly fetching it from.synthetics
folder.API is inspired from Playwright Attachments API - https://playwright.dev/docs/api/class-testresult#test-result-attachments
With this, we should be able to support the usecases such as
The text was updated successfully, but these errors were encountered: