Technical Overview
Wix Pilot integrates seamlessly with your testing environment by combining natural language processing with robust testing capabilities.
Building Blocks of Wix Pilot
To enable Wix Pilot to work harmoniously with your testing framework and app, it relies on several building blocks:
- Dynamic Code Generation: Pilot generates testing code on-the-fly to perform actions or assertions based on your instructions.
- Visual Analysis: Pilot can analyze the app's screen to verify the presence of specific elements or text, enabling assertions beyond standard UI checks.
- App View Hierarchy: The testing framework generates an XML representation of the app's view hierarchy, helping Pilot interact with all UI elements, even those not directly visible.
- Snapshot Images: Optional snapshot images provide Pilot with visual context for more precise understanding and analysis.
- API Catalog: Pilot uses an extensible API catalog that can be enriched with custom testing commands and context.
- Caching Mechanism: Pilot caches execution results to optimize performance and reduce unnecessary LLM calls.
- Test Context Awareness: Pilot maintains awareness of previously executed steps, ensuring continuity and readability in the test flow.
Pilot's Execution Flow
The execution flow of Wix Pilot can be broken down into these main steps:
- Initialize: Set up Pilot with your framework configuration using
Pilot.init()
. - Start Session: Begin a test flow with
pilot.start()
. - Execute Tests: Choose between:
- Single steps using
pilot.perform()
for granular control - Automated flows using
pilot.autopilot()
for goal-driven testing
- Single steps using
- End Session: Conclude the test flow with
pilot.end()
.
Performance Optimization
Pilot implements several optimization strategies:
- Smart Caching: Temporary and permanent caching of execution results
- Configurable Analysis Modes: Control the depth of visual analysis
- Extensible API Catalog: Add custom commands to reduce LLM calls
- Snapshot Management: Efficient handling of screen captures and comparisons
You can configure these optimizations through the Config
options when initializing Pilot:
pilot.init({
frameworkDriver: yourDriver,
promptHandler: yourHandler,
options: {
cacheMode: 'full' | 'lightweight' | 'disabled',
analysisMode: 'basic' | 'detailed'
}
});