Skip to content
Snippets Groups Projects

AI-Powered Mobile App Testing Environment

Overview

This development environment serves as the foundation for a PhD research project on "Automatisiertes Testen mit KI" (Automated Testing with AI). It provides a containerized environment that integrates various tools and frameworks for AI-powered mobile application testing, combining both white-box and black-box testing approaches.

Key Features

  • TensorFlow 2.18.0 with GPU support for deep learning and reinforcement learning
  • Complete Android SDK environment with emulator support
  • JDK 21 (Microsoft OpenJDK) for Java development
  • Kotlin 1.8.20 compiler for Android development
  • Python 3.11 with essential ML and testing libraries
  • CUDA support for GPU acceleration (when enabled)
  • VS Code integration with recommended extensions

Prerequisites

  • Docker with GPU support (nvidia-docker2 for GPU capabilities)
  • VS Code with Remote Containers extension
  • At least 50GB free disk space
  • 16GB RAM minimum (32GB recommended)
  • NVIDIA GPU with CUDA support (optional, for GPU acceleration)

Quick Start

  1. Clone the repository:

    git clone <repository-url>
    cd MobileAppKITestplattform/environment
  2. Configure environment variables (optional):

    • Edit .devcontainer/.env to modify default settings
    • Set USE_GPU=true if GPU support is needed
  3. Open in VS Code:

    code .

    Then click "Reopen in Container" when prompted.

  4. Access via Frontend:

    • The testing environment can be accessed through the central testing platform frontend
    • Navigate to the platform URL in your browser
    • Login with your credentials
    • Access both black-box and white-box testing modules through the unified interface

Environment Structure

environment/
├── .devcontainer/
│   ├── Dockerfile          # Container definition
│   ├── devcontainer.json   # VS Code container configuration
│   └── .env               # Environment variables
├── requirements.txt        # Python dependencies
└── README.md              # This file

Included Components

AI and Machine Learning

  • TensorFlow 2.18.0
  • PyTorch with CUDA support
  • Android-env for RL-based testing
  • Stable-baselines3 for reinforcement learning
  • Wandb for experiment tracking

Development Tools

  • Android SDK (API 34)
  • Platform Tools
  • Command Line Tools
  • System Images (x86_64)
  • Maven 3.9.9
  • Gradle 7.5.1

Testing Frameworks

  • JUnit Parser
  • Python testing utilities
  • White-box testing tools
  • Black-box testing frameworks

Configuration Options

GPU Support

To enable/disable GPU support, modify .devcontainer/.env:

USE_GPU=true
NVIDIA_VISIBLE_DEVICES=all

Java/Android Settings

Default versions in .devcontainer/.env:

JDK_VERSION=21
GRADLE_VERSION=7.5.1
KOTLIN_VERSION=1.8.20
ANDROID_SDK_VERSION=9477386

VS Code Integration

The environment comes with pre-configured VS Code settings and recommended extensions for:

  • Python development
  • Java/Kotlin development
  • Android development
  • Jupyter notebooks
  • GitHub Copilot
  • Code quality tools

Common Tasks

Running Android Emulator

# Create an AVD
avdmanager create avd -n test_avd -k "system-images;android-34;google_apis;x86_64"

# Start the emulator
emulator -avd test_avd -no-window -gpu swiftshader_indirect

Managing Python Dependencies

# Install new dependencies
pip install <package-name>

# Update requirements.txt
pip freeze > requirements.txt

Troubleshooting

GPU Issues

  • Ensure NVIDIA drivers are properly installed
  • Verify docker-nvidia2 is installed and configured
  • Check CUDA compatibility with TensorFlow version

Android Emulator

  • Use -no-window flag for headless environments
  • Ensure KVM is enabled for better performance
  • Check system resources if emulator is slow

Contributing

Please refer to the contribution guidelines in the main repository. For environment-specific changes:

  1. Document all modifications
  2. Test with both GPU and non-GPU setups
  3. Update requirements.txt when adding dependencies
  4. Verify Android emulator functionality

License

This environment setup is part of the PhD research project. Please refer to the main repository for license information.