Overview

Visual Studio Code (VSCode) is a powerful, lightweight code editor that supports extensive customization and extensions. By integrating Gbox with VSCode, you can leverage AI agents to automatically test and validate your Android applications in cloud-based Android environments. This integration enables you to:
  • Automated Testing - Let AI agents test your Android apps on real or virtual devices
  • Seamless Development - Test your code changes directly from your IDE
  • Cloud-Based Testing - No need for local Android device setup
  • AI-Powered Workflow - Intelligent test generation and execution

Prerequisites

Before setting up the VSCode integration, ensure you have:
  • VSCode installed on your system (MCP support requires VS Code 1.102 or later)
  • An Android project for testing (we’ve prepared a Demo repository that you can use to get started quickly)

Getting Started

1

Install Gbox CLI

Install the Gbox CLI tool to manage your Gbox configuration.
sudo npm install -g @gbox.ai/cli
2

Login and Configure Gbox

Authenticate with your Gbox account and set up the configuration.
gbox login
This command will prompt you to enter your Gbox API key and configure your account.
3

Configure MCP Server with VSCode

Set up the Model Context Protocol (MCP) server to enable communication between VSCode and Gbox.You can configure the MCP server either globally or at the project level:Global Configuration: Create or modify your MCP configuration file at ~/.vscode/mcp.json:Project-Level Configuration: Alternatively, you can create the configuration file at .vscode/mcp.json in your project directory for project-specific settings.
{
  "servers": {
    "gbox-android": {
      "command": "npx",
      "args": [
        "-y",
        "@gbox.ai/mcp-android-server@latest"
      ]
    }
  }
}
MCP Server Configuration
4

Add VSCode Copilot Instructions

Create a project-level instruction file to guide Copilot Agents during testing. You can start by copying our template and then customizing it:
cd <your-android-repo-dir>
mkdir -p .github
curl -fsSL https://raw.githubusercontent.com/babelcloud/open-webui/refs/heads/main/.github/instructions/android-testing.instructions.md -o .github/android-testing.instructions.md   
You can include:
  • Test account credentials
  • Project-specific setup guides
  • Feature specs and limitations
5

Develop and Test Your Android App with VSCode Copilot

In VSCode with GitHub Copilot Agent Mode enabled, you can now use AI agents to test your Android applications.VSCode Copilot Setup 1VSCode Copilot Setup 2VSCode Copilot Setup 3The AI agent will now be able to:
  • Create Android boxes on demand
  • Install and test your applications
  • Perform automated UI testing
  • Handle device management automatically

Ready to Build Your Android App!

Congratulations! You’ve successfully set up the VSCode + Gbox integration. Now you can leverage the power of AI to develop and test your Android applications seamlessly. With this setup, you can:
  • Create new Android projects from scratch with AI assistance
  • Build and test your apps in cloud-based Android environments
  • Automate UI testing without managing physical devices
  • Iterate quickly with instant feedback from AI agents
Start by creating a new Android project or using our demo repository as a reference, then let the AI agent help you build, test, and refine your Android applications!