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
Define an interface that exports a persist method, abstracting away how or where the file is being persisted.
Why?
The browser module can take screenshots. These screenshots are currently either:
Persisted to the local disk relative to the k6 binary;
Returned to the user in the test script for them to do something with the binary data.
When a user works with the first option, we want the browser module to either:
persist the file to the local disk;
or upload it to remote location.
The interface needs to be generic enough to allow for both these cases, and it's only exported method should be to persist a blob of data.
How?
Define an interface that takes:
the context;
the file path;
the stream of data.
which will satisfy the requirement of abstracting away the how and where the file is being saved.
It is a good idea to generalise the problem (use io.writer) to a blob of data even though the main use case is to store the screenshots so that we can stream the data either to disk or a remote location.
Tasks
The content you are editing has changed. Please copy your edits and refresh the page.
What?
Define an interface that exports a persist method, abstracting away how or where the file is being persisted.
Why?
The browser module can take screenshots. These screenshots are currently either:
When a user works with the first option, we want the browser module to either:
The interface needs to be generic enough to allow for both these cases, and it's only exported method should be to persist a blob of data.
How?
Define an interface that takes:
context
;which will satisfy the requirement of abstracting away the how and where the file is being saved.
It is a good idea to generalise the problem (use
io.writer
) to a blob of data even though the main use case is to store the screenshots so that we can stream the data either to disk or a remote location.Tasks
Tasks
Related PR(s)/Issue(s)
Take a look at grafana/k6#3017 for some more guidance.
The text was updated successfully, but these errors were encountered: