|
| 1 | +--- |
| 2 | +id: app-automation-slack-notifications |
| 3 | +title: Slack Notifications for App Automation |
| 4 | +sidebar_label: Slack Notifications |
| 5 | +description: Get real-time Slack notifications for your test sessions and build summaries on TestMu AI. |
| 6 | +keywords: |
| 7 | + - slack notifications |
| 8 | + - app automation slack |
| 9 | + - slack test notifications |
| 10 | + - mobile testing slack |
| 11 | + - build notifications slack |
| 12 | + - testmu ai slack |
| 13 | +url: https://www.testmuai.com/support/docs/app-automation-slack-notifications/ |
| 14 | +site_name: TestMu AI |
| 15 | +slug: app-automation-slack-notifications/ |
| 16 | +canonical: https://www.testmuai.com/support/docs/app-automation-slack-notifications/ |
| 17 | +--- |
| 18 | + |
| 19 | +import CodeBlock from '@theme/CodeBlock'; |
| 20 | +import Tabs from '@theme/Tabs'; |
| 21 | +import TabItem from '@theme/TabItem'; |
| 22 | +import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; |
| 23 | +import BrandName, { BRAND_URL } from '@site/src/component/BrandName'; |
| 24 | + |
| 25 | +<script type="application/ld+json" |
| 26 | + dangerouslySetInnerHTML={{ __html: JSON.stringify({ |
| 27 | + "@context": "https://schema.org", |
| 28 | + "@type": "BreadcrumbList", |
| 29 | + "itemListElement": [{ |
| 30 | + "@type": "ListItem", |
| 31 | + "position": 1, |
| 32 | + "name": "Home", |
| 33 | + "item": BRAND_URL |
| 34 | + },{ |
| 35 | + "@type": "ListItem", |
| 36 | + "position": 2, |
| 37 | + "name": "Support", |
| 38 | + "item": `${BRAND_URL}/support/docs/` |
| 39 | + },{ |
| 40 | + "@type": "ListItem", |
| 41 | + "position": 3, |
| 42 | + "name": "Slack Notifications for App Automation", |
| 43 | + "item": `${BRAND_URL}/support/docs/app-automation-slack-notifications/` |
| 44 | + }] |
| 45 | + }) |
| 46 | + }} |
| 47 | +></script> |
| 48 | + |
| 49 | +With Slack Notifications for App Automation, you can receive real-time updates about your test sessions and build summaries directly in your Slack channels. This eliminates the need to manually monitor the dashboard and keeps your entire team informed about test execution results. |
| 50 | + |
| 51 | +## Prerequisites |
| 52 | + |
| 53 | +- A <BrandName /> account with App Automation access. |
| 54 | +- [Slack Integration](/support/docs/slack-integration/) enabled on your <BrandName /> account. |
| 55 | +- The Slack channel(s) you want to send notifications to must already exist in your Slack workspace. |
| 56 | + |
| 57 | +## Setting Up Slack Notifications |
| 58 | + |
| 59 | +To enable Slack notifications for your App Automation tests, add the `slackChannel` capability to your test configuration. Notifications are sent automatically when each test session completes and when the entire build finishes execution. |
| 60 | + |
| 61 | +### Capability Reference |
| 62 | + |
| 63 | +| Attribute | Details | |
| 64 | +|-----------|---------| |
| 65 | +| **Capability** | `slackChannel` | |
| 66 | +| **Type** | String | |
| 67 | +| **Required** | No (optional) | |
| 68 | +| **Example** | `mobile-test-results` | |
| 69 | + |
| 70 | +### Configuration Examples |
| 71 | + |
| 72 | +<Tabs className="docs__val"> |
| 73 | +<TabItem value="java" label="Java" default> |
| 74 | + |
| 75 | +```java |
| 76 | +DesiredCapabilities capabilities = new DesiredCapabilities(); |
| 77 | +capabilities.setCapability("platformName", "Android"); |
| 78 | +capabilities.setCapability("deviceName", "Galaxy S23"); |
| 79 | +capabilities.setCapability("app", "lt://APP123456789"); |
| 80 | +capabilities.setCapability("build", "Regression Suite v2.0"); |
| 81 | +capabilities.setCapability("name", "Login Test"); |
| 82 | +capabilities.setCapability("isRealMobile", true); |
| 83 | +//highlight-next-line |
| 84 | +capabilities.setCapability("slackChannel", "mobile-test-results"); |
| 85 | +``` |
| 86 | + |
| 87 | +</TabItem> |
| 88 | +<TabItem value="python" label="Python"> |
| 89 | + |
| 90 | +```python |
| 91 | +desired_caps = { |
| 92 | + "platformName": "Android", |
| 93 | + "deviceName": "Galaxy S23", |
| 94 | + "app": "lt://APP123456789", |
| 95 | + "build": "Regression Suite v2.0", |
| 96 | + "name": "Login Test", |
| 97 | + "isRealMobile": True, |
| 98 | + #highlight-next-line |
| 99 | + "slackChannel": "mobile-test-results" |
| 100 | +} |
| 101 | +``` |
| 102 | + |
| 103 | +</TabItem> |
| 104 | +<TabItem value="javascript" label="JavaScript"> |
| 105 | + |
| 106 | +```javascript |
| 107 | +const capabilities = { |
| 108 | + platformName: "Android", |
| 109 | + deviceName: "Galaxy S23", |
| 110 | + app: "lt://APP123456789", |
| 111 | + build: "Regression Suite v2.0", |
| 112 | + name: "Login Test", |
| 113 | + isRealMobile: true, |
| 114 | + //highlight-next-line |
| 115 | + slackChannel: "mobile-test-results" |
| 116 | +}; |
| 117 | +``` |
| 118 | + |
| 119 | +</TabItem> |
| 120 | +</Tabs> |
| 121 | + |
| 122 | +## What Notifications You Receive |
| 123 | + |
| 124 | +<BrandName /> sends two types of Slack notifications: |
| 125 | + |
| 126 | +| Notification Type | When It's Sent | What It Contains | |
| 127 | +|-------------------|----------------|------------------| |
| 128 | +| **Session Update** | When each test session completes | Session name, status (passed/failed), device info | |
| 129 | +| **Build Summary** | When all sessions in a build finish | Overall pass/fail count, build duration, build link | |
| 130 | + |
| 131 | +## How Channel Routing Works |
| 132 | + |
| 133 | +The `slackChannel` capability is set at the session level. If you update the channel name in a subsequent session under the same build, notifications for that session onward are sent to the updated channel. |
| 134 | + |
| 135 | +:::tip |
| 136 | +When multiple users or multiple sessions specify different channels concurrently within the same build, all channels are merged and notifications are sent to all of them. |
| 137 | +::: |
| 138 | + |
| 139 | +## Fallback Behavior |
| 140 | + |
| 141 | +If the `slackChannel` capability is not provided or the specified channel is invalid, <BrandName /> follows this fallback logic: |
| 142 | + |
| 143 | +1. **Channel provided and valid** → Notifications are sent to the specified channel. |
| 144 | +2. **Channel provided but invalid** (e.g., channel doesn't exist or fails validation) → Notifications fall back to the default channel configured in your [Slack Integration settings](/support/docs/slack-integration/). |
| 145 | +3. **No channel provided** → Notifications are sent to the default channel if one is configured; otherwise, notifications are skipped silently. |
| 146 | + |
| 147 | +:::warning Important |
| 148 | +Slack notifications never block or impact your test execution. If a notification fails to deliver for any reason, the test continues to run normally. |
| 149 | +::: |
| 150 | + |
| 151 | +## Related Resources |
| 152 | + |
| 153 | +- [Slack Integration Setup](/support/docs/slack-integration/) |
| 154 | +- [Desired Capabilities in App Automation](/support/docs/desired-capabilities-in-appium/) |
| 155 | +- [Getting Started with App Automation](/support/docs/getting-started-with-appium-testing/) |
| 156 | + |
| 157 | +> Got any questions?<br/> |
| 158 | +> Please reach out at our <span className="doc__lt" onClick={() => window.openLTChatWidget()}>**24x7 Chat Support**</span> or you could also mail us at [support@testmuai.com](https://support.lambdatest.com/). |
| 159 | +
|
| 160 | +<nav aria-label="breadcrumbs"> |
| 161 | + <ul className="breadcrumbs"> |
| 162 | + <li className="breadcrumbs__item"> |
| 163 | + <a className="breadcrumbs__link" target="_self" href={BRAND_URL}> |
| 164 | + Home |
| 165 | + </a> |
| 166 | + </li> |
| 167 | + <li className="breadcrumbs__item"> |
| 168 | + <a className="breadcrumbs__link" target="_self" href={`${BRAND_URL}/support/docs/`}> |
| 169 | + Support |
| 170 | + </a> |
| 171 | + </li> |
| 172 | + <li className="breadcrumbs__item breadcrumbs__item--active"> |
| 173 | + <span className="breadcrumbs__link"> |
| 174 | + Slack Notifications for App Automation |
| 175 | + </span> |
| 176 | + </li> |
| 177 | + </ul> |
| 178 | +</nav> |
0 commit comments