TestCube is a smart testing tool that simplifies mobile app testing by automating test case generation using AI. It allows users to upload APK files, explore app UI structure, assign inputs intelligently, and generate detailed test reports β all from a user-friendly dashboard.
- π APK Inspection: Unpacks APKs to extract package info, activities, and intents
- π UI Tree Generation: Builds a tree of reachable UI pages from the app
- π€ AI-Based Input Assignment: Detects input fields and generates valid/invalid test cases
- π Test Report Generation: Produces detailed test reports for each app version
- π Version Tracking: Compares different versions of the same app for regression analysis
- π Authentication System: Secure login to manage user apps and reports
- π₯οΈ Dashboard View: Upload, monitor, and manage multiple APKs easily
- Node.js & npm
- Python 3.10+
- MongoDB
- Java (JDK 11+ recommended)
- Android SDK + ADB
- DroidBot
- Gemini API Key (for AI input assignment)
git clone https://github.com/your-username/testcube.git
cd testcube-
Make sure you have:
.apkfile path of the app you want to analyze.- A device or an emulator connected to your host machine via
adb.
-
Start DroidBot:
droidbot -a <path_to_apk> -o output_dirThat's it! You will find much useful information, including the UTG, generated in the output dir.
- If you are using multiple devices, you may need to use
-d <device_serial>to specify the target device. The easiest way to determine a device's serial number is callingadb devices. - On some devices, you may need to manually turn on accessibility service for DroidBot (required by DroidBot to get current view hierarchy).
- If you want to test a large scale of apps, you may want to add
-keep_envoption to avoid re-installing the test environment every time. - You can also use a json-format script to customize input for certain states. Here are some script samples. Simply use
-script <path_to_script.json>to use DroidBot with a script. - If your apps do not support getting views through Accessibility (e.g., most games based on Cocos2d, Unity3d), you may find
-cvoption helpful. - You can use
-humanoidoption to let DroidBot communicate with Humanoid in order to generate human-like test inputs. - You may find other useful features in
droidbot -h.
- If you are using multiple devices, you may need to use
-
Run Backend:
Create a .env file in the backend directory with necessary environment variables like:
MONGO_URI=mongodb://localhost:27017/testcube
GEMINI_API_KEY=your-api-key-here
Then, install dependencies and start the backend server:
npm install
npm run start
- To Setup Server Socket:
cd ../socket-server
cp .env.example .env # or manually create the .env file
npm install
npm run start
- To setup Frontend
cd ../frontend
cp .env.example .env # include API endpoints and keys
npm install
npm run dev