Token导航 LogoToken导航TokenDH.com
Appium MCP AI Driven Mobile Automation On Android logo
浏览器工具stdio官方级别未说明来源级核验

Appium MCP AI Driven Mobile Automation On Android

MCP Server

appium

Appium + MCP 是一款AI驱动的移动自动化测试工具,支持Android原生应用和Chrome浏览器的自动化测试,适用于软件开发和测试场景。

工具数

5

提示词数

0

GitHub Stars

5

资源数

0
自动化测试HTMLVS CodeAI驱动VS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

mvsaran

提供方

mvsaran

最后核验

2026/5/17 20:23

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx appium --address 0.0.0.0 --port 4723 --base-path /

详细介绍

🚀 Appium+MCP——安卓平台上的人工智能驱动移动自动化

Appium Logo

Android Java TestNG

建造一次。用简单的英语提示控制一切。

Appium+模型上下文协议(MCP)+GitHub Copilot=一个人工智能辅助的移动自动化实验室,由本地应用程序提供支持 *和* 移动Chrome浏览器。

特性建筑快速开始文档

______________________________________________________________________

🎯 特性

🤖 人工智能驱动的自动化

  • 自然语言控制:使用简明英语驱动移动应用程序
  • GitHub复制集成:人工智能辅助测试生成
  • 智能定位器发现:自动检测UI元素
  • 代码生成:自动创建页面对象和测试

📱 完成移动测试

  • 原生Android应用程序:完全支持UiAutor2
  • 移动Chrome浏览器:Android上的Web自动化
  • 真实设备和模拟器:适用于两者
  • E2E工作流程:登录、结账、搜索验证

______________________________________________________________________

🎬 在行动中看到它

🔍 人工智能驱动的元素发现

MCP服务器智能地从您的Android应用程序中发现和映射UI元素:

*AI通过稳定的内容描述定位器自动识别登录字段、按钮、产品卡和结账元素*

______________________________________________________________________

🌐 浏览器自动化变得简单

使用自然语言命令执行复杂的浏览器工作流:

*通过对话式人工智能提示搜索谷歌、验证结果和捕获定位器*

______________________________________________________________________

✅ 端到端测试执行

观看AI完成从登录到结账的整个测试流程:

*AI导航Swag Labs应用程序,将商品添加到购物车中,并完成结账,然后生成测试代码*

______________________________________________________________________

🏗 建筑

┌─────────────────────────────────────────────┐
│         VS Code + GitHub Copilot            │
│            (Agent Mode + MCP)               │
│  "Add two items to cart and checkout"       │
└────────────────┬────────────────────────────┘
                 │ MCP Protocol (stdio)
┌────────────────▼────────────────────────────┐
│         @gavrix/appium-mcp                  │
│       (Node.js MCP Server)                  │
│                                             │
│  • Reads capabilities.json                  │
│  • Exposes tools:                           │
│    - start_session                          │
│    - find_element                           │
│    - click, send_keys                       │
│    - get_page_source                        │
└────────────────┬────────────────────────────┘
                 │ WebDriver Protocol
┌────────────────▼────────────────────────────┐
│          Appium Server (v3+)                │
│       UiAutomator2 Driver                   │
└────────────────┬────────────────────────────┘
                 │ ADB
┌────────────────▼────────────────────────────┐
│      Android Emulator / Device              │
│                                             │
│  📱 Swag Labs App    🌐 Chrome Browser      │
└─────────────────────────────────────────────┘

______________________________________________________________________

📚 目录

______________________________________________________________________

✅ 先决条件

🔧 所需软件

开始之前,请确保安装了以下工具:

工具用途安装
📦 梅文构建自动化和依赖关系管理下载Maven
📝 Node.jsAppium服务器运行时(18+)
📱 Appium服务器移动测试自动化服务器(3.0+)npm install -g appium
🔧 Appium UiAutomator2Android自动化驱动程序appium driver install uiautomator2
🔍 Appium 检查器元件定位器和检测工具下载Appium检查器
🤖 安卓工作室Android SDK和模拟器管理下载安卓工作室
💻 VS Code支持Copilot和MCP的IDE下载VS代码
🤖 GitHub CopilotAI代码助手(需要订阅)安装扩展
📊 Allure CLI生成交互式测试报告npm install -g allure-commandline

📥 安装步骤

1.安装Java JDK

# Verify Java installation
java -version

# Expected output:
# java version "17.0.x" or "11.0.x" or "21.0.x"

2.安装Maven

# Verify Maven installation
mvn -version

# Expected output:
# Apache Maven 3.x.x

3.安装Node.js和Appium

# Verify Node.js
node -v
npm -v

# Install Appium globally
npm install -g appium

# Install UiAutomator2 driver
appium driver install uiautomator2

# Verify Appium installation
appium -v

# Expected output: 3.x.x

4.设置Android Studio

  1. 下载并安装 Android工作室 developer.android.com
  1. 安装SDK组件:

- Android SDK平台工具 - Android SDK构建工具 - 模拟器 - Android SDK平台(API 33或更高版本)

  1. 创建Android虚拟设备(AVD):

- 打开安卓工作室 - 工具→ 设备管理器→ 创建设备 - 选择设备(例如Pixel 7) - 选择系统映像(推荐API 33+) - 完成并启动模拟器

🌍 环境变量(Windows)

ANDROID_HOME = C:\Users\\AppData\Local\Android\Sdk
JAVA_HOME    = C:\Program Files\Eclipse Adoptium\jdk-17
MAVEN_HOME   = C:\Program Files\Apache\maven

PATH += %ANDROID_HOME%\platform-tools
        %ANDROID_HOME%\tools
        %ANDROID_HOME%\emulator
        %JAVA_HOME%\bin
        %MAVEN_HOME%\bin

🍎 环境变量(Mac/Linux)

添加到您的 ~/.bash_profile~/.zshrc:

export ANDROID_HOME=$HOME/Library/Android/sdk
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/emulator

然后重新加载:

source ~/.bash_profile  # or source ~/.zshrc

✅ 验证检查表

运行以下命令以验证您的设置:

# Check Java
java -version          # Should show version 11, 17, or 21

# Check Maven
mvn -version           # Should show Apache Maven 3.x

# Check Node.js
node -v                # Should show v18.x or higher
npm -v                 # Should show v9.x or higher

# Check Appium
appium -v              # Should show 3.x or higher

# Check Android SDK
adb devices            # Should list connected devices/emulators

# Check emulator
emulator -list-avds    # Should list your virtual devices

# Check Allure (optional)
allure --version       # Should show allure 2.x

预期输出示例:

✅ java version "17.0.9"
✅ Apache Maven 3.9.5
✅ v18.18.0
✅ 9.8.1
✅ 3.0.1
✅ List of devices attached
   emulator-5554    device
✅ Pixel_7_API_33
✅ 2.24.0

______________________________________________________________________

🚀 快速开始

1.克隆和设置项目

# Clone repository
git clone  AppiumProject
cd AppiumProject

# Create MCP server module
mkdir mcp-server
cd mcp-server
npm init -y
npm install @gavrix/appium-mcp --save-dev
cd ..

2.配置功能

创建 mcp-server/capabilities.json:

{
  "android": {
    "platformName": "Android",
    "appium:deviceName": "emulator-5554",
    "appium:automationName": "UiAutomator2",
    "appium:app": "C:\\apkfiles\\AndroidUI.apk",
    "appium:appPackage": "com.swaglabsmobileapp",
    "appium:appActivity": "com.swaglabsmobileapp.MainActivity",
    "appium:noReset": true
  },
  "androidBrowser": {
    "platformName": "Android",
    "appium:deviceName": "emulator-5554",
    "appium:automationName": "UiAutomator2",
    "appium:browserName": "Chrome",
    "appium:noReset": true,
    "appium:chromeOptions": {
      "args": [
        "--disable-fre",
        "--no-first-run",
        "--disable-popup-blocking"
      ]
    }
  }
}

3.配置VS代码MCP

创建 .vscode/mcp.json:

{
  "servers": {
    "appium-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["@gavrix/appium-mcp"],
      "env": {
        "CAPABILITIES_CONFIG": "${workspaceFolder}/mcp-server/capabilities.json",
        "ANDROID_HOME": "${env:ANDROID_HOME}"
      }
    }
  }
}

4.启动服务

# Terminal 1: Start Android Emulator
emulator -avd 

# Terminal 2: Start Appium Server
npx appium --address 0.0.0.0 --port 4723 --base-path /

5.使用复制品代理

打开 VS代码复制聊天 并尝试:

Use the appium-mcp tools with the "android" capabilities.

1. Start a new session
2. Log in to Swag Labs with "standard_user" / "secret_sauce"
3. Add two products to cart
4. Complete checkout
5. Log the locators used

______________________________________________________________________

🗂 项目结构

AppiumProject/
├─ .vscode/
│  └─ mcp.json                    # MCP server configuration
│
├─ mcp-server/
│  ├─ package.json                # Node dependencies
│  ├─ capabilities.json           # Android app & browser configs
│  └─ node_modules/
│
├─ src/
│  ├─ main/java/
│  │  └─ utils/                   # Helper utilities
│  │
│  └─ test/java/
│     ├─ Base/
│     │  └─ BaseClass.java        # WebDriver setup
│     │
│     ├─ Pages/                   # Page Object Models
│     │  ├─ LoginPage.java
│     │  ├─ ProductsPage.java
│     │  ├─ CartPage.java
│     │  └─ CheckoutPages.java
│     │
│     └─ tests/                   # TestNG test classes
│        ├─ LoginTest.java
│        ├─ CartCheckoutTest.java
│        └─ GoogleSearchTest.java
│
├─ pom.xml                        # Maven dependencies
├─ testng.xml                     # TestNG suite configuration
└─ README.md                      # This file

______________________________________________________________________

⚙ 配置

能力说明

原生Android应用程序配置文件

{
  "android": {
    "platformName": "Android",
    "appium:deviceName": "emulator-5554",        // Your device ID
    "appium:automationName": "UiAutomator2",     // Android automation
    "appium:app": "C:\\path\\to\\your.apk",      // APK path
    "appium:appPackage": "com.example.app",      // Package name
    "appium:appActivity": ".MainActivity",        // Launch activity
    "appium:noReset": true                       // Keep app state
  }
}

Chrome浏览器配置文件

{
  "androidBrowser": {
    "platformName": "Android",
    "appium:deviceName": "emulator-5554",
    "appium:automationName": "UiAutomator2",
    "appium:browserName": "Chrome",              // Use Chrome
    "appium:chromeOptions": {
      "args": [
        "--disable-fre",                          // Skip first-run
        "--no-first-run",
        "--disable-popup-blocking"
      ]
    }
  }
}

______________________________________________________________________

💡 使用示例和提示

🌐 示例1:Chrome谷歌搜索(浏览器测试)

将此提示复制并粘贴到Copilot Chat中:

Use the appium-mcp tools with the "androidBrowser" capabilities.

Steps:
1. Create a new session
2. Navigate to https://www.google.com
3. Locate the search box and type: Appium automation
4. Submit the search (tap enter or search button)
5. Verify at least one search result contains the word "Appium"
6. Return the locators used and a boolean result

Do not generate Java code yet — just perform the actions.

预期产量:

  • 使用Chrome浏览器创建的会话
  • 谷歌导航已完成
  • 搜索已成功执行
  • 验证结果
  • 定位器返回(例如。, input[name="q"],CSS选择器)

______________________________________________________________________

📱 示例2:Swag实验室-全面探索和测试计划设计

将此综合提示复制并粘贴到Copilot Chat中:

Use the appium-mcp tools with my existing Android Swag Labs capabilities from mcp-server/capabilities.json (the android profile) to explore the Swag Labs mobile app and design a full automation plan.

Goal: Open the Swag Labs app, perform a full cart checkout flow, and then propose how to implement it in Java + TestNG with Page Object Model. Do not generate any Java code yet – only describe steps, structure, and test plan.

Part 1 – Explore & document the app flow (using tools)

1. Start a new Android Appium session using the android capabilities.

2. On the Login screen, identify reliable locators for:
   - Username field
   - Password field
   - Login button

3. Log in with standard_user / secret_sauce.

4. On the Products screen, identify locators for:
   - Page title ("PRODUCTS" or equivalent)
   - Product items (name, price, add-to-cart button for at least 2 items)
   - Cart icon / cart badge

5. Add at least two items to the cart, then navigate to the Cart screen and capture locators for:
   - Cart item rows (name, price)
   - Remove button
   - Checkout button

6. Proceed to Checkout (Your Information) screen and identify locators for:
   - First name, Last name, Postal code fields
   - Continue button

7. Proceed to Checkout Overview screen and capture:
   - Line items and their prices
   - Subtotal / Tax / Total labels and values
   - Finish button

8. On the Checkout Complete screen, identify:
   - Confirmation message
   - Back Home button

For each screen, return:
- Screen name
- Key elements and their locators (id/accessibilityId/xpath)
- Any navigation assumptions (e.g., expected previous state)

Part 2 – Propose POM structure (no code, just design)

Based on what you found, propose a Page Object Model for my Java project.

Suggest page classes under package Pages, for example:
- LoginPage
- ProductsPage
- CartPage
- CheckoutInformationPage
- CheckoutOverviewPage
- CheckoutCompletePage

For each page, list:
- The main fields and actions it should expose (method names, e.g., login(username, password), addProductToCart(String productName), goToCart(), completeCheckout(...), etc.)
- Which locators (from Part 1) each method would use
- Assume I already have a BaseClass that manages driver setup/teardown; explain how each page will receive and use the driver

Part 3 – Propose TestNG test structure (still no code)

Design the TestNG test classes and test methods for a Swag Labs E2E cart checkout flow.

Suggest class and method names under package tests, for example:
- LoginTest
- CartCheckoutTest
- LogoutTest

For each test method, outline the exact high-level steps it will perform using the POM methods (e.g., "call loginPage.login(...) → productsPage.addProductToCart(...) → cartPage.verifyItems(...) → …").

Identify which assertions should be made at each stage, such as:
- Successful login (Products page visible)
- Correct items and prices in cart
- Correct totals (subtotal vs sum of items)
- Successful checkout completion message

Mention how TestNG groups (e.g., @Test(groups = {"smoke"}), {"regression"}) could be organized for these tests.

Part 4 – Full test plan summary

Finally, summarize the overall test plan for Swag Labs mobile E2E using Appium + Java + TestNG + POM:
- Scope of coverage for the cart checkout flow
- Additional scenarios to add later (negative login, remove item from cart, failed payment edge cases, etc.)
- Any risks or flakiness you foresee (locators, timing, network) and how you recommend handling them

Important: In this answer, do not output any Java code. Only describe the locators you used, the POM design, the TestNG test structure, and the test plan in detail. I will ask for concrete Java code later.

预期产量:

  • 全面探索Swag Labs的所有屏幕
  • 每个元素的详细定位器映射
  • POM架构设计(6页课程)
  • TestNG测试结构方案
  • 具有风险评估的综合测试计划

______________________________________________________________________

🔄 示例3:生成测试代码(探索后)

运行示例2后,使用以下提示:

Based on the Swag Labs exploration we just completed:

1. Generate a complete Java TestNG test class for the cart checkout flow
2. Use my BaseClass.java for driver setup/teardown
3. Implement all Page Object classes you proposed:
   - LoginPage
   - ProductsPage
   - CartPage
   - CheckoutInformationPage
   - CheckoutOverviewPage
   - CheckoutCompletePage
4. Follow POM best practices:
   - PageFactory with @FindBy annotations
   - Separate locators from actions
   - Reusable methods
5. Add proper assertions at each step
6. Include TestNG annotations and groups
7. Add proper waits (WebDriverWait)

Generate the complete code now.

______________________________________________________________________

🔍 示例4:元素发现和分析

Use the appium-mcp tools with the "android" capabilities.

1. Start a new session on the current screen
2. Dump the entire UI hierarchy
3. For each clickable element, show:
   - resource-id
   - content-desc
   - text attribute
   - bounds/coordinates
   - clickable status
4. Suggest which locator strategy is most stable for each element
5. Identify any elements that might cause flakiness

Do not generate code - just provide the analysis.

______________________________________________________________________

📊 示例5:数据驱动测试设置

Use the appium-mcp tools to help design a data-driven login test.

1. Explore the login screen locators
2. Propose a TestNG DataProvider structure with multiple test users:
   - standard_user (valid)
   - locked_out_user (should fail)
   - problem_user (valid but may have issues)
   - performance_glitch_user (valid)
3. Design the test method signature
4. Describe expected behavior for each user type
5. Suggest assertions for each scenario

Then generate the complete Java code with DataProvider.

______________________________________________________________________

🎯 快速测试提示

启动浏览器会话

Use appium-mcp with "androidBrowser" to open Chrome and navigate to https://appium.io. Return the page title.

屏幕截图

Use appium-mcp with "android" to take a screenshot of the current screen and save it.

检查应用程序状态

Use appium-mcp to check if Swag Labs app is running. If not, launch it and return to login screen.

验证元素是否存在

Use appium-mcp to verify the login button exists on screen. Return its content-desc and resource-id.

______________________________________________________________________

🧪 示例用例

1.️⃣ 原生应用测试:Swag Labs E2E

工作流程:

Login → Browse Products → Add to Cart → Checkout Info → 
Review Order → Complete Purchase → Verify Confirmation

人工智能能力:

  • ✅ 自动发现稳定 content-desc 定位器
  • ✅ 生成页面对象模型结构
  • ✅ 使用断言创建TestNG测试类
  • ✅ 处理动态元素(购物车徽章、商品计数)

已发现关键定位器:

  • 登录: test-Username, test-Password, test-LOGIN
  • 产品: test-PRODUCTS, test-Item, test-ADD TO CART
  • 购物车: test-Cart, test-CHECKOUT
  • 结账: test-First Name, test-Last Name, test-Zip/Postal Code

______________________________________________________________________

2.️⃣ 浏览器测试:谷歌搜索验证

工作流程:

Launch Chrome → Open Google → Search Query → 
Verify Results → Extract Locators

人工智能能力:

  • ✅ 处理Chrome首次运行对话框
  • ✅ 自动切换到WEBVIEW上下文
  • ✅ 使用web定位器(CSS、XPath)
  • ✅ 以编程方式验证搜索结果

上下文切换:

Set contexts = driver.getContextHandles();
driver.context("WEBVIEW_chrome");  // Switch to web view

______________________________________________________________________

3.️⃣ 探索性测试

使用AI分析应用程序结构:

Use appium-mcp to:

1. Start session on current screen
2. Dump all clickable elements
3. For each element, show:
   - resource-id
   - content-desc
   - text
   - bounds
4. Suggest which locators are most stable

输出可帮助您:

  • 🎯 选择最佳定位器策略
  • 🎯 及早识别片状元素
  • 🎯 设计健壮的页面对象

______________________________________________________________________

🧯 故障排除

❌ "Could not connect to Appium server"

原因:

  • Appium服务器未运行
  • 主机/端口/路径配置错误

解决:

# Start Appium with correct settings
npx appium --address 0.0.0.0 --port 4723 --base-path /

# Verify it's running
curl http://localhost:4723/status

对于Appium检查员:

  • 主持人: 127.0.0.1
  • 端口: 4723
  • 路径: /

❌ "No route found for /session" or POST /session 404

原因: 路径不匹配(Appium v1与v2/3风格)

解决方案:

# Use Appium 2/3 with root path
npx appium --base-path /

# NOT /wd/hub (legacy)

❌ "Invalid or unsupported WebDriver capabilities"

原因: 功能对象为空或格式错误

解决:

  • 验证 capabilities.json 语法
  • 检查 CAPABILITIES_CONFIG 路径在 mcp.json
  • 确保配置文件名称匹配(例如。, "android")

❌ Chrome "Make Chrome your own" popup

解决:

  1. 使用chromeOptions标志:
"appium:chromeOptions": {
  "args": [
    "--disable-fre",
    "--no-first-run",
    "--disable-popup-blocking"
  ]
}
  1. 手动设置:
  • 点击第一次运行一次
  • 保持 "appium:noReset": true

❌ Stylus/Handwriting tutorial overlay

解决:

  • 在Gboard设置中禁用: Handwriting → OFF
  • 或者以编程方式处理:
if (driver.findElements(By.xpath("//*[contains(@text,'stylus')]")).size() > 0) {
    driver.findElement(By.id("android:id/button2")).click(); // Cancel
}

❌ "adb: device offline"

解决:

# Restart ADB
adb kill-server
adb start-server
adb devices

# Restart emulator if needed

______________________________________________________________________

🎓 高级主题

多剖面测试

为不同场景创建其他配置文件:

{
  "android_debug": { ... },
  "android_release": { ... },
  "android_tablet": { ... },
  "chrome_incognito": { ... }
}

在提示中切换配置文件:

Use the "android_tablet" capabilities...

______________________________________________________________________

CI/CD集成

GitHub操作示例:

name: Mobile Tests

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - name: Setup Android SDK
        uses: android-actions/setup-android@v2
      
      - name: Start Emulator
        run: |
          $ANDROID_HOME/emulator/emulator -avd test_avd -no-window &
          adb wait-for-device
      
      - name: Start Appium
        run: |
          npm install -g appium
          appium driver install uiautomator2
          appium &
      
      - name: Run Tests
        run: mvn clean test

______________________________________________________________________

报告集成

添加诱惑报告:


    io.qameta.allure
    allure-testng
    2.24.0
# Generate report
mvn clean test
allure serve allure-results

______________________________________________________________________

🔮 下一个想法

  • \[ \] 并行执行:在多个设备上运行测试
  • \[ \] 云测试:集成BrowserStack/Sauce实验室
  • \[ \] 目视检测:添加应用工具眼睛
  • \[ \] 演出:测量应用程序启动时间、响应
  • \[ \] 无障碍:验证内容描述、对讲
  • \[ \] 负面情景:测试错误处理,边缘情况
  • \[ \] API集成:组合API+UI测试
  • \[ \] 多MCP设置:链接多个MCP服务器

______________________________________________________________________

📖 学习教程

视频教程

🎥 官方项目详解

![Appium + MCP Tutorial](https://www.youtube.com/watch?v=jgwNTCuCk9E&t=78s)

你将学到什么:

  • 完成安装演练
  • MCP+Apium集成的实时演示
  • 创作者的提示和最佳实践
  • 常见问题排查

______________________________________________________________________

循序渐进的学习路径

🌱 初学者轨道

第1周:基础

  • \[\]安装Java、Node.js、Android Studio
  • \[\]设置Appium和UiAutomator2
  • \[\]配置环境变量
  • \[\]创建第一个Android模拟器

第2周:基础自动化

  • \[\]编写第一个Appium测试
  • \[\]了解定位器策略
  • \[\]与Appium Inspector练习
  • \[\]完成简单登录测试

资源:

🚀 中间轨道

第3周:MCP集成

  • \[\]安装@gavrix/appium-mcp
  • \[\]配置功能.json
  • \[\]设置VS代码MCP
  • \[\]启用GitHub Copilot代理

第4周:页面对象模型

  • \[\]设计POM架构
  • \[\]创建可重用的页面类
  • \[\]实施TestNG测试
  • \[\]添加断言和验证

资源:

💎 高级跟踪

第5周:人工智能驱动测试

  • \[\]掌握自然语言提示
  • \[\]自动生成测试代码
  • \[\]优化定位器策略
  • \[\]处理动态元素

第6周:生产准备就绪

  • \[\]设置CI/CD管道
  • \[\]整合报告(Allure)
  • \[\]并行测试执行
  • \[\]云设备测试

资源:

______________________________________________________________________

📚 推荐资源

官方文件

资源描述链接
Appium文档完整的Appium文档appium.io/docs
MCP规范模型上下文协议规范模型上下文协议.io
UiAutomator2Android自动化驱动程序
测试指南测试框架文档testng.org

社区资源

博客和文章

______________________________________________________________________

🎯 实践练习

练习1:基本应用程序测试

Objective: Master basic Appium commands

Tasks:
1. Launch the sample app
2. Find and click 3 different elements
3. Input text into a field
4. Verify element visibility
5. Take a screenshot

Expected Time: 30 minutes

练习2:MCP+AI集成

Objective: Use AI to generate test code

Tasks:
1. Use Copilot to explore app structure
2. Ask AI to identify all clickable elements
3. Generate a login test using natural language
4. Have AI create a Page Object Model
5. Run the generated test

Expected Time: 45 minutes

练习3:E2E流量自动化

Objective: Automate complete user journey

Tasks:
1. Map out Swag Labs checkout flow
2. Use MCP to discover all locators
3. Generate complete test suite with AI
4. Add assertions at each step
5. Implement TestNG data providers

Expected Time: 90 minutes

______________________________________________________________________

🏆 认证和技能验证

技能检查表:

  • \[ \] 环境设置 (Java、Node.js、安卓SDK、Appium)
  • \[ \] Appium基础知识 (会话、定位器、交互)
  • \[ \] MCP集成 (服务器设置、功能配置)
  • \[ \] 人工智能辅助测试 (自然语言提示、代码生成)
  • \[ \] 页面对象模型 (设计模式、可重用性)
  • \[ \] TestNG框架 (注释、断言、数据提供者)
  • \[ \] CI/CD集成 (GitHub Actions,Jenkins)
  • \[ \] 报告 (魅力、范围报告)
  • \[ \] 故障排除 (调试、日志分析)
  • \[ \] 最佳实践 (代码质量、可维护性)

______________________________________________________________________

💬 获取帮助和支持

卡住了?以下是如何获得帮助:

  1. 检查故障排除部分 -已解决的常见问题
  2. 审查文件 -官方指南优先
  3. 搜索GitHub问题 -有人可能已经面对过了
  4. 询问社区 -Appium论坛,堆栈溢出
  5. 打开问题 -提供日志、截图、代码

在寻求帮助时,包括:

  • ✅ Appium版本(appium -v)
  • ✅ Node.js版本(node -v)
  • ✅ 设备/仿真器详细信息
  • ✅ 完成错误消息和堆栈跟踪
  • ✅ 相关代码片段
  • ✅ 重现步骤

______________________________________________________________________

🤝 贡献

欢迎投稿!拜托:

  1. 分叉存储库
  2. 创建特征分支(git checkout -b feature/amazing-feature)
  3. 提交更改(git commit -m 'Add amazing feature')
  4. 推送到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

______________________________________________________________________

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

______________________________________________________________________

🙏 致谢

  • Appium团队 -移动自动化框架
  • @加夫里克斯 -appium mcp mcp服务器实现
  • Anthropic -模型上下文协议规范
  • GitHub -副驾驶AI助手

______________________________________________________________________

🚀作者

萨兰·库马尔

由...制作❤️ 移动自动化社区

目录标签

目录标签

自动化测试HTMLVS CodeAI驱动本地部署移动应用测试AppiumMCP

支持客户端

VS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

appium

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP