Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
155 changes: 155 additions & 0 deletions docs/accessibility-android-automation-test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
id: accessibility-android-automation-test
title: Automation Tests with Accessibility Tool using Android
sidebar_label: Automation
description: Use LambdaTest Accessibility DevTools to detect and report accessibility issues with automation, following WCAG guidelines.
keywords:
- LambdaTest
- Accessibility
- Testing
- Automation
- Accessibility Testing Settings
url: https://www.lambdatest.com/support/docs/accessibility-android-automation-test/
site_name: LambdaTest
slug: accessibility-android-automation-test/
---

import CodeBlock from '@theme/CodeBlock';
import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<script type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify({
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "https://www.lambdatest.com"
},{
"@type": "ListItem",
"position": 2,
"name": "Support",
"item": "https://www.lambdatest.com/support/docs/"
},{
"@type": "ListItem",
"position": 3,
"name": "Accessibility Android Test",
"item": "https://www.lambdatest.com/support/docs/accessibility-android-automation-test/"
}]
})
}}
></script>

This guide walks you through automating accessibility testing of a native Android app using **LambdaTest's Accessibility Automation Tool (Beta) via Appium**. You'll run an automated accessibility scan on a real Android device hosted on LambdaTest’s real device cloud infrastructure.

## Prerequisites

- Your [LambdaTest Username and Access key](/support/docs/using-environment-variables-for-authentication-credentials/)
- Python 3.x or Java JDK 8+ installed
- Appium Python Client or Java Client Library

## Step-by-Step Guide to Trigger Your Test

### Step 1: Setup Your Test Suite

You can use your own project to configure and test it. For demo purposes, we are using the sample repository.

:::tip sample repo
Download or Clone the code sample from the LambdaTest GitHub repository to run your tests.

<a href="https://github.com/LambdaTest/lambdatest-accessibility-selenium" className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
:::

If you are using your own project, make sure you update the **Hub endpoint** in your tests file. By setting up the Hub endpoint, you establish the communication channel between your tests and the browser nodes, enabling effective test distribution and execution.

Configure the desired capabilities based on your test requirements. For example:

<Tabs className="docs__val">

<TabItem value="python" label="Python" default>

<div className="lambdatest__codeblock">

```python
desired_cap = {
"platform": "android",
"isRealMobile": True,
"app": "lt://APP", # Replace with your LambdaTest App URL
"accessibility": True,
"buildName": "Accessibility-lambda",
"idleTimeout": 1800,
"build": "NewAppiumBuild",
"name": "MyTest",
"devicelog": True
}
```

</div>

</TabItem>

<TabItem value="java" label="Java" default>

<div className="lambdatest__codeblock">
```java
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "android");
caps.setCapability("isRealMobile", true);
caps.setCapability("app", "lt://APPID"); // Replace with your App ID
caps.setCapability("accessibility", true);
caps.setCapability("idleTimeout", 1800);
caps.setCapability("build", "AccessibilityScanBuild");
caps.setCapability("name", "MyTest");
caps.setCapability("devicelog", true);
```
</div>

</TabItem>
</Tabs>


> You can generate capabilities for your test requirements with the help of our inbuilt 🔗 [Capabilities Generator Tool](https://www.lambdatest.com/capabilities-generator/).

### Step 2: Establish User Authentication

Now, you need to export your environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile page](https://accounts.lambdatest.com/detail/profile).

Run the below mentioned commands in your terminal to setup the CLI and the environment variables.

<Tabs className="docs__val">

<TabItem value="bash" label="Linux / MacOS" default>

<div className="lambdatest__codeblock">
<CodeBlock className="language-bash">
{`export LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
export LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
</CodeBlock>
</div>

</TabItem>

<TabItem value="powershell" label="Windows" default>

<div className="lambdatest__codeblock">
<CodeBlock className="language-powershell">
{`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
</CodeBlock>
</div>

</TabItem>
</Tabs>

### Step 3: Execute and Monitor your Test

Now execute your tests and visit the [Automation Dashboard](https://accounts.lambdatest.com/dashboard). Click on the Accessibility tab and check the report generated.

```bash
mvn test
```

<img loading="lazy" src={require('../assets/images/accessibility-testing/accessibility-automation.png').default} alt="automation-dashboard" className="doc_img"/>
141 changes: 40 additions & 101 deletions docs/accessibility-android-test.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
id: accessibility-android-test
title: Automation Tests with Accessibility Tool using Android
sidebar_label: Automation
title: Accessibility Testing Using App Manual Testing
sidebar_label: Manual
description: Use LambdaTest Accessibility DevTools to detect and report accessibility issues with automation, following WCAG guidelines.
keywords:
- LambdaTest
- Accessibility
- Testing
- Automation
- Manual
- Accessibility Testing Settings
url: https://www.lambdatest.com/support/docs/accessibility-android-test/
site_name: LambdaTest
Expand Down Expand Up @@ -42,114 +42,53 @@ import TabItem from '@theme/TabItem';
})
}}
></script>

This guide walks you through automating accessibility testing of a native Android app using **LambdaTest's Accessibility Automation Tool (Beta) via Appium**. You'll run an automated accessibility scan on a real Android device hosted on LambdaTest’s real device cloud infrastructure.
LambdaTest offers a powerful Accessibility Scanner for native Android apps, integrated seamlessly with our manual app testing environment. This helps QA teams and developers identify accessibility issues directly during real-time testing sessions. Follow this guide to understand how to perform accessibility scans manually.

## Prerequisites
- You must have access to the LambdaTest Real Device Cloud.
- Your Android app (.apk or .aab) should be uploaded to the platform.
- Ensure you have enabled the Accessibility feature from your account or project settings, if applicable.

- Your [LambdaTest Username and Access key](/support/docs/using-environment-variables-for-authentication-credentials/)
- Python 3.x or Java JDK 8+ installed
- Appium Python Client or Java Client Library

## Step-by-Step Guide to Trigger Your Test

### Step 1: Setup Your Test Suite

You can use your own project to configure and test it. For demo purposes, we are using the sample repository.

:::tip sample repo
Download or Clone the code sample from the LambdaTest GitHub repository to run your tests.

<a href="https://github.com/LambdaTest/lambdatest-accessibility-selenium" className="github__anchor"><img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub</a>
:::

If you are using your own project, make sure you update the **Hub endpoint** in your tests file. By setting up the Hub endpoint, you establish the communication channel between your tests and the browser nodes, enabling effective test distribution and execution.

Configure the desired capabilities based on your test requirements. For example:

<Tabs className="docs__val">

<TabItem value="python" label="Python" default>

<div className="lambdatest__codeblock">

```python
desired_cap = {
"platform": "android",
"isRealMobile": True,
"app": "lt://APP", # Replace with your LambdaTest App URL
"accessibility": True,
"buildName": "Accessibility-lambda",
"idleTimeout": 1800,
"build": "NewAppiumBuild",
"name": "MyTest",
"devicelog": True
}
```

</div>

</TabItem>

<TabItem value="java" label="Java" default>

<div className="lambdatest__codeblock">
```java
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("platform", "android");
caps.setCapability("isRealMobile", true);
caps.setCapability("app", "lt://APPID"); // Replace with your App ID
caps.setCapability("accessibility", true);
caps.setCapability("idleTimeout", 1800);
caps.setCapability("build", "AccessibilityScanBuild");
caps.setCapability("name", "MyTest");
caps.setCapability("devicelog", true);
```
</div>

</TabItem>
</Tabs>


> You can generate capabilities for your test requirements with the help of our inbuilt 🔗 [Capabilities Generator Tool](https://www.lambdatest.com/capabilities-generator/).

### Step 2: Establish User Authentication

Now, you need to export your environment variables *LT_USERNAME* and *LT_ACCESS_KEY* that are available in the [LambdaTest Profile page](https://accounts.lambdatest.com/detail/profile).

Run the below mentioned commands in your terminal to setup the CLI and the environment variables.

<Tabs className="docs__val">
## Steps to perform Accessibility Testing using the App Scanner
### Step 1: Navigate to the Accessibility Section
- Log in to your LambdaTest dashboard.
- From the left-hand menu, click on Accessibility.
- Select the **App Scanner** tab under the Accessibility tab.

<TabItem value="bash" label="Linux / MacOS" default>
<img loading="lazy" src={require('../assets/images/accessibility-testing/app-automation/app-scanner.gif').default} alt="Image" className="doc_img"/>

<div className="lambdatest__codeblock">
<CodeBlock className="language-bash">
{`export LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
export LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
</CodeBlock>
</div>
### Step 2: Launch Manual App Testing
- Choose the target Android device and upload/select your application.
- Click Start to launch the manual testing session on the selected device.

</TabItem>
### Step 3: Scan the App Screens
Once inside the manual testing environment:

<TabItem value="powershell" label="Windows" default>
- Interact with your app just like a real user — navigate through different screens, buttons, and views.
- As you reach a screen you want to test for accessibility:
- Open the Accessibility tab from the left control panel.
- Click on Scan Page.

<div className="lambdatest__codeblock">
<CodeBlock className="language-powershell">
{`set LT_USERNAME="${ YOUR_LAMBDATEST_USERNAME()}"
set LT_ACCESS_KEY="${ YOUR_LAMBDATEST_ACCESS_KEY()}"`}
</CodeBlock>
</div>
The scanner will analyze the current screen and return a list of detected accessibility issues.

</TabItem>
</Tabs>
### Step 4: Review Accessibility Issues
After scanning, you’ll see a categorized list of issues based on severity (Critical, Serious, Moderate, Minor). Each issue includes:
- Description of the accessibility problem.
- List of affected element.
- Suggested fix or recommendation.

### Step 3: Execute and Monitor your Test
Continue testing by navigating to additional screens in the app and scanning them one-by-one. This helps ensure that your entire app meets accessibility standards across all flows and use cases.

Now execute your tests and visit the [Automation Dashboard](https://accounts.lambdatest.com/dashboard). Click on the Accessibility tab and check the report generated.
<video class="right-side" width="100%" controls id="vid">
<source src= {require('../assets/images/accessibility-testing/app-automation/maunal-app-accessiblity.mp4').default} type="video/mp4" />
</video>

```bash
mvn test
```
### Step 5: Accessibility Report
After completion of your scanning, click on the **Save Test** button.
- Go to the **Manual Reports** tab under the Accessibility tab.
- Select your desired report
- You can also share the report over email, export it in JSON, CSV and PDF format, and also you create an issue as well for that report.

<img loading="lazy" src={require('../assets/images/accessibility-testing/accessibility-automation.png').default} alt="automation-dashboard" className="doc_img"/>
<video class="right-side" width="100%" controls id="vid">
<source src= {require('../assets/images/accessibility-testing/app-automation/manual-app-accessibility-report.mp4').default} type="video/mp4" />
</video>
7 changes: 6 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1742,9 +1742,14 @@ module.exports = {
items: [
{
type: "doc",
label: "Automation",
label: "Manual",
id: "accessibility-android-test",
},
{
type: "doc",
label: "Automation",
id: "accessibility-android-automation-test",
},
]
},
{
Expand Down
Loading