How ing-bank/mint works
Main Components
• Core Engine (core module): Contains the central libraries (MintLoop, MintRun, MintServer, Reporter, StateRepository, etc.) and defines the basic types for oracles, probes, rules, queries, and their orchestration. This module underpins the whole system.
• Android Core (android-core module): Provides Android-specific implementations, utility classes, and integration with native Android components. This is where most UI–specific logic is implemented (e.g., Espresso integration, Android probes, and android-specific rules such as for accessibility).
• API Module (api): Offers public API abstractions (such as MINT, MINTApi, and MINTRule) and integrations with JUnit (test runners like MintClassRunner and MintTestRunner) to facilitate automated test execution.
• Espresso Runner (espresso-runner module): A specialized test runner built on top of Espresso. It contains components for executing interactions, capturing screenshots, and gathering Android device state. It is focused on running “live” tests on Android and translating test actions to Espresso actions.
• Integration Test Runner (integration-test-runner module): Another runner module designed to aggregate and execute integration tests within the MINT framework.
• Tooling (tooling module): Provides supplementary tasks for device management (e.g., ADB commands, report rendering, cleaning device states) and report generation. This module supports the test execution infrastructure by automating side tasks and post-processing.
• Demo App (app module) and sample application in core/android-core tests: A demonstration Android application that serves as a testing target for the tool, showcasing how to integrate MINT into a sample project.
Detail the Relationships and Interactions Between Components
• At the heart of the system lies the Core Engine. This component orchestrates test runs, handles state management, and issues commands based on the selected rules (which are defined in libraries such as the android-core and core modules).
• The Android Core module interacts with the platform’s UI components; it encapsulates Android-specific functionality (including state observations, testing probes, and oracles for accessibility or logging).
• The API module exposes an abstraction for test definitions and integrates with standard testing frameworks (JUnit), enabling communication between test definitions and the test execution modules.
• The Espresso Runner and Integration Test Runner modules serve as entry points for executing tests. They integrate with the Android Core and use the components provided by the Core Engine to initiate automated tests.
• The Tooling module runs in parallel to support the test runners by offering build tasks, device management functionalities, and reporting capabilities.
Recognize Architectural Patterns and Technologies
• Modularity: The project is highly modular – separating concerns into core libraries, Android-specific implementations, test runners, and tooling.
• Layered Architecture: There is a clear divide between the “business logic” layer (Core Engine, API) and the “platform-specific” layer (Android Core, Espresso Runner, Integration Test Runner).
• Plug & Play Extensibility: The use of rules, probes, and oracles, as described in the README, points to an architecture where components can be added or exchanged for customization.
• Test Automation Framework Design: Incorporates principles similar to those in the TESTAR framework, with an emphasis on automated exploration and stateful analysis.
Elements
• Blocks labeled “Core Engine” (core) with sub-components such as MintLoop, MintRun, Reporter, etc.
• A block for “Android Core” showing Android–specific UI testing functions, oracles (e.g., Accessibility, crash, logging oracles), and rule enforcement.
• Blocks for “API Module” (exposing MINTApi and MINTRule) with a clear link to the JUnit integration layer (including MintClassRunner and MintTestRunner).
• A “Tooling” block with tasks like ADB commands, report renderer, and device state cleaning.
• A “Demo App” (or sample application) block that represents the target application against which tests are run.
• Data flow from core to runners and vice versa.
• Control flow from API to the Core Engine.
• Dependency and support links from Tooling to both test runners.