From f6d24b09664be467f654ede16ac0217bac6ec36b Mon Sep 17 00:00:00 2001 From: akshayverma Date: Mon, 22 Jun 2026 17:38:12 +0530 Subject: [PATCH] Appium Terminal Logs --- docs/appium-terminal-logs.md | 171 +++++++++++++++++++++++++++++++++++ sidebars.js | 3 +- 2 files changed, 173 insertions(+), 1 deletion(-) create mode 100644 docs/appium-terminal-logs.md diff --git a/docs/appium-terminal-logs.md b/docs/appium-terminal-logs.md new file mode 100644 index 000000000..fddef0cd7 --- /dev/null +++ b/docs/appium-terminal-logs.md @@ -0,0 +1,171 @@ +--- +id: appium-terminal-logs +title: Terminal Logs for Appium Tests +hide_title: true +sidebar_label: Terminal Logs +description: Upload your own Appium server, test-runner, or CI logs to any app automation session and view or download them from the TestMu AI dashboard under Logs › Terminal. +keywords: + - appium terminal logs + - upload terminal logs appium + - appium debugging logs + - app automation terminal logs + - real device virtual device logs +image: /assets/images/og-images/automation-testing-og.png +url: https://www.testmuai.com/support/docs/appium-terminal-logs/ +site_name: TestMu AI +slug: appium-terminal-logs/ +canonical: https://www.testmuai.com/support/docs/appium-terminal-logs/ +--- + +import CodeBlock from '@theme/CodeBlock'; +import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; +import RealDeviceTag from '../src/component/realDevice'; +import VirtualDeviceTag from '../src/component/virtualDevice'; +import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; + + + +# Terminal Logs for Appium Tests + +--- + + lets you attach **your own terminal logs** (Appium server logs, test-runner output, or CI logs) to any app automation session through a single REST API. Once uploaded, you can view or download them directly from the Automation dashboard under **Logs › Terminal**. + +This keeps your own diagnostic logs next to the session they belong to, so you can correlate them with the session's native logs (Appium, device, network, crash) in one place, without jumping between your CI system, local files, and the dashboard. + +--- +## How it works + +- **One log per session** A session holds at most one terminal log at a time. +- **Latest upload** Every upload replaces the existing log, regardless of the filename. +- **No special capability is required.** Any valid session can receive a terminal log. There is no opt-in flag to set in your test capabilities. +- **Retention** follows the session's normal artifact retention. The log is kept and expires on the same schedule as the session's other logs. + +--- + +## Upload a terminal log + +Use the **upload** endpoint to attach a log file to a session. The file is sent as a multipart form field named `file`. Uploading again replaces the previous file. + +
+ +{`curl -u "${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}" -X POST "https://mobile-api.lambdatest.com/mobile-automation/api/v1/sessions//log/terminallog" --form "file=@/path/to/appium.log" +`} + +
+ +Replace `` with your actual session ID and `/path/to/appium.log` with the path to your log file. + +On success, the API returns: + +```json +{ "status": "success", "message": "File has been uploaded successfully!" } +``` + +## View terminal logs in the dashboard +--- + +Open the session on the Automation dashboard. The **Terminal** sub-tab is always available under **Logs** (next to **Crash**). Once you upload a log file, it starts showing up in this tab, where you can view the file and read its contents in the browser. + +:::note +The **Terminal** tab is always present. It stays empty until a terminal log is uploaded for the session. +::: + +{/* Terminal logs sub-tab on the Automation dashboard */} + +## Download a terminal log +--- + +To download the uploaded log, add the `download=true` query parameter to the view endpoint: + +
+ +{`curl -u "${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}" -X GET "https://mobile-api.lambdatest.com/mobile-automation/api/v1/sessions//log/terminallog?download=true" --output terminal-logs.log +`} + +
+ +:::info +The downloaded file is always named `terminal-logs.`, where `` is your original file extension. The original base filename is not retained. +::: + +## Delete a terminal log +--- + +To remove the attached log from a session, use the **delete** endpoint: + +
+ +{`curl -u "${ YOUR_LAMBDATEST_USERNAME()}:${ YOUR_LAMBDATEST_ACCESS_KEY()}" -X DELETE "https://mobile-api.lambdatest.com/mobile-automation/api/v1/sessions//log/terminallog" +`} + +
+ +## Supported formats and limits +--- + +| | Value | +| ------------------- | ---------------------------------------------------------------------------------- | +| Maximum file size | 5 MB | +| Allowed file types | `.txt`, `.json`, `.xml`, `.log`, `.csv`, `.html`, `.yaml`, `.yml`, `.har`, `.gz` | +| Files per session | 1 (each upload replaces the previous file) | +| Empty (0-byte) file | Not allowed | + + + +## FAQ +--- + +**Can I upload more than one file to a session?** +No. A session holds one terminal log at a time, and each new upload replaces the previous one. + +**How long are terminal logs kept?** +They follow the session's normal artifact retention, on the same schedule as the session's other logs. There is no separate retention setting. + +**Do I need a special capability to use this?** +No. Any valid app automation session can receive a terminal log; there is no opt-in flag to set in your test capabilities. + + +If you still have any questions for us, please feel free to let us know via our window.openLTChatWidget()}>**24X7 Chat Portal** or mail us to support@testmuai.com + + diff --git a/sidebars.js b/sidebars.js index 7deea67e1..aec2faa55 100644 --- a/sidebars.js +++ b/sidebars.js @@ -3205,7 +3205,8 @@ module.exports = { "smart-heal-appium", "apple-pay-auto", "button-text-click", - "ios-shake-gesture-appautomation" + "ios-shake-gesture-appautomation", + "appium-terminal-logs" ], }, {