Skip to content

Documentation / test-reporting / fetchAppAutomateLogs

Function: fetchAppAutomateLogs() ​

fetchAppAutomateLogs(app, session, sessionId, wanted): Promise<SessionLogs>

Defined in: test-reporting/src/linked-sessions.ts:187

Fetches the wanted log kinds for an App Automate session. Its logs live under the App Automate build id.

Parameters ​

ParameterTypeDescription
appAppAutomateClient-
session{ appDetails: { appCustomId?: string; appFilename?: string; appName?: string; appUrl?: string; appVersion?: string; uploadedAt?: string; }; appiumLogsUrl?: string; browser: string | null; browserConsoleLogsUrl?: string; browserstackStatus: string; browserUrl: string; browserVersion: string; buildHashedId?: string; buildName: string; buildTerminalLogsUrl?: string; createdAt: string; device?: string; deviceLogsUrl?: string; duration: number; harLogsUrl?: string; hashedId: string; insights?: {[key: string]: unknown; }; logs: string; name: string; os: string; osVersion: string; projectName: string; publicUrl: string; realMobile?: boolean; reason: string; seleniumLogsUrl?: string; seleniumTelemetryLogsUrl?: string; sessionTerminalLogsUrl?: string; status: "done" | "running" | "timeout" | "failed" | "passed"; testPriority?: string | null; videoUrl: string; }-
session.appDetails{ appCustomId?: string; appFilename?: string; appName?: string; appUrl?: string; appVersion?: string; uploadedAt?: string; }-
session.appDetails.appCustomId?string-
session.appDetails.appFilename?stringFile name of the uploaded app (verified live, e.g. WikipediaSample.apk).
session.appDetails.appName?stringPackage name of the app Example com.sample.loginapplication
session.appDetails.appUrl?string-
session.appDetails.appVersion?string-
session.appDetails.uploadedAt?string-
session.appiumLogsUrl?stringURL to view the Appium logs Example https://api.browserstack.com/automate/builds/5343932818f9330c5d2b5c72aaf9dd8fde77b428/sessions/550709149fe79e949363b581e774d5ebffa1b8fe/appiumlogs
session.browserstring | nullNull for App Automate sessions (verified live), which have no browser. Example Chrome
session.browserConsoleLogsUrl?stringURL to view browser console logs Example https://automate.browserstack.com/s3-upload/bs-selenium-logs-aps/s3.ap-south-1/550709149fe79e949363b581e774d5ebffa1b8fe/550709149fe79e949363b581e774d5ebffa1b8fe-console-logs-v2.txt
session.browserstackStatusstringExecution status of the session. Observed live: done, failed, passed.
session.browserUrlstringURL to view the session on Automate dashboard Example https://automate.browserstack.com/builds/5343932818f9330c5d2b5c72aaf9dd8fde77b428/sessions/550709149fe79e949363b581e774d5ebffa1b8fe
session.browserVersionstringExample 80.0
session.buildHashedId?stringHashed ID of the Automate build this session belongs to. This is the Automate build id, not the Test Reporting build id. Example 5a2325a471c829812cd32ed5e63fdc5f8d2c0250
session.buildNamestringName of the build Example pricing_project_build
session.buildTerminalLogsUrl?stringPresigned URL of the build's terminal logs.
session.createdAtstringTimestamp at which the session started executing Example 2020-03-11T10:14:36.000Z
session.device?stringExample null
session.deviceLogsUrl?stringURL of the device logs.
session.durationnumberDuration of session execution Example 10
session.harLogsUrl?stringURL to view browser logs Example https://automate.browserstack.com/s3-upload/bs-selenium-logs-euw/s3.eu-west-1/550709149fe79e949363b581e774d5ebffa1b8fe/550709149fe79e949363b581e774d5ebffa1b8fe-har-logs.txt
session.hashedIdstringHashed ID of the session Example 4207442b2b0567368956dba064c22a3235a76214
session.insights?{[key: string]: unknown; }Time breakdown for the session (totals, BrowserStack vs user time, and optimisation links).
session.logsstringLink to the session logs Example https://automate.browserstack.com/builds/5343932818f9330c5d2b5c72aaf9dd8fde77b428/sessions/550709149fe79e949363b581e774d5ebffa1b8fe/logs
session.namestringName of your session Example pricing_project_build
session.osstringExample Windows
session.osVersionstringExample 10
session.projectNamestringName of the project Example pricing_project
session.publicUrlstringURL to view the session publicly Example https://automate.browserstack.com/builds/5343932818f9330c5d2b5c72aaf9dd8fde77b428/sessions/550709149fe79e949363b581e774d5ebffa1b8fe?auth_token=01df4e51ba67eb743484a08b024a44601a2ae0399c5c011a68d9564147be1387
session.realMobile?booleanExample null
session.reasonstringReason for test status Example CLIENT_STOPPED_SESSION
session.seleniumLogsUrl?stringURL to view selenium logs Example https://automate.browserstack.com/s3-upload/bs-selenium-logs-euw/s3.eu-west-1/550709149fe79e949363b581e774d5ebffa1b8fe/550709149fe79e949363b581e774d5ebffa1b8fe-selenium-logs.txt
session.seleniumTelemetryLogsUrl?stringURL to view telemetry logs if it is enabled in your Selenium 4 session Example https://automate.browserstack.com/s3-upload/bs-selenium-logs-euw/s3.eu-west-1/550709149fe79e949363b581e774d5ebffa1b8fe/550709149fe79e949363b581e774d5ebffa1b8fe-selenium-logs.txt
session.sessionTerminalLogsUrl?stringPresigned URL of the session's terminal logs.
session.status"done" | "running" | "timeout" | "failed" | "passed"Outcome of the session. Observed live on Automate and App Automate: passed, failed. running and timeout are documented but not yet observed; done is a browserstack_status value, not a status.
session.testPriority?string | nullPriority label set on the session, if any.
session.videoUrlstringURL to view session video Example https://automate.browserstack.com/sessions/550709149fe79e949363b581e774d5ebffa1b8fe/video
sessionIdstring-
wantedLogKind[]-

Returns ​

Promise<SessionLogs>