Recording a Test Session
To record a test session, you can use thedashcam
command in your lifecycle scripts. There are two main lifecycle scripts where you can integrate Dashcam: lifecycle/prerun.yaml
and lifecycle/postrun.yaml
.
Ways to use Dashcam
Dashcam comes as a standalone app and a Chrome extension. You can use either or both to capture your test sessions.To capture web logs, make sure to install the Dashcam Chrome extension on the
browser you are testing with. We recommend installing it via CLI to Chrome for
Testing. You can also find the extension in the Chrome
Webstore
Installing the Dashcam Chrome extension via command line in prerun.yaml
In this lifecycle script, we install Chrome for Testing with a user profile that has the password manager disabled and sets up TestDriver Dashcam for replays and logs.lifecycle/prerun.yaml
Using the Chrome extension and capturing web logs
Now in the samelifecycle/prerun.yaml
script, we set up Dashcam to track web logs and application logs. You can customize the patterns to match your needs. Testing Desktop? You can skip the web logs and just track application logs.
lifecycle/prerun.yaml
Starting Dashcam
The final step in ourlifecycle/prerun.yaml
script is to start Dashcam recording.
lifecycle/prerun.yaml
Publishing replays to a project in your account
Lastly, in thelifecycle/postrun.yaml
script, we publish the recorded Dashcam session to a project in your Dashcam account. Make sure to replace <YOUR_PROJECT_ID>
with the actual ID of your project.
lifecycle/postrun.yaml
${TD_THIS_FILE}
is an environment variable set by TestDriver that contains
the name of the current test file being executed. This will be used as the
title of the Dashcam recording. For more info see parallel testing
docs.