Maestro Workbench is a Visual Studio Code extension designed to enhance the development and testing of Maestro YAML files. It offers features such as IntelliSense, syntax highlighting, formatting, test execution, and output visualization to streamline your workflow.
-
IntelliSense and Syntax Highlighting: Provides code completions and highlights syntax for Maestro YAML files, reducing errors and improving readability.
-
Schema Validation: Ensure the correctness of your Maestro YAML files with integrated schema validation, highlighting errors and enforcing best practices.
syntax.mp4
-
Test Execution with Feedback: Run your Maestro tests directly from the test explorer, receive real-time feedback on their status—running, passed, or failed and view outputs.
tests1.mp4
test2.mp4
-
Snippets: Utilize predefined code snippets to quickly scaffold Maestro commands and flows, enhancing productivity.
snippets.1.mp4
-
Customizable File Patterns: Configure the extension to detect Maestro YAML files based on your project's structure by setting custom file patterns.
filePatterns.1.mp4
-
Environment Variable Support: Define environment variables within your workspace settings and reference system environment variables using
{ENV:VAR_NAME}
syntax. Support for default values is also available, e.g.,{ENV:API_KEY:default123}
. -
Integrated Tree View: Visualize and manage your Maestro test files within a dedicated tree view, providing quick access and organization as well as viewing flow dependencies.
dependencies.mp4
-
Maestro Studio Integration: Launch Maestro Studio directly from the extension.
-
Test Explorer Integration
- View all Maestro test files in the test explorer
- Run individual tests or all tests at once
- Automatic device selection for test execution
- Support for both Android and iOS devices
- Environment variable management for tests
-
Device Management
- List available Android and iOS devices
- Select device for test execution
- Set default device in settings
- Support for physical devices, simulators, and offline devices
-
File Management
- Tree view for Maestro test files
- Automatic test discovery
- File watching for changes
- YAML schema validation
You can configure the default device for test execution in VS Code settings:
{
"maestroWorkbench.defaultDevice": "device-id"
}
Leave this empty to be prompted for device selection each time you run tests.
Configure environment variables for your tests:
{
"maestroWorkbench.envVariables": {
"API_URL": "https://example.com",
"TOKEN": "{ENV:TOKEN}",
"AUTH_TOKEN": "{ENV:API_KEY:default_token}"
}
}
Environment variables can be:
- Direct values:
"API_URL": "https://example.com"
- System environment variables:
"TOKEN": "{ENV:TOKEN}"
- System environment variables with defaults:
"AUTH_TOKEN": "{ENV:API_KEY:default_token}"
- Open the Test Explorer view in VS Code
- Select one or more test files to run
- Click the "Run Tests" button or use the test explorer's run command
- If no default device is set, select a device from the list
- Tests will run on the selected device
- Use the "List Available Devices" command to view all connected devices
- Devices are grouped by type (Android Device, iOS Device, iOS Simulator)
- Each device entry shows:
- Device name
- Device ID
- Device type and status
- Open VS Code settings
- Search for "maestroWorkbench.defaultDevice"
- Enter the device ID of your preferred device
- The device will be used automatically when running tests
maestroWorkbench.listDevices
: List all available devicesmaestroWorkbench.runTest
: Run a specific test filemaestroWorkbench.runFolderTests
: Run all tests in a foldermaestroWorkbench.refreshTree
: Refresh the test explorermaestroWorkbench.openMaestroStudio
: Open Maestro Studio
Ensure that you have Maestro installed on your system to utilize the testing features of this extension. You can download and install Maestro from the official repository.
Maestro Workbench allows customization of file patterns to detect Maestro YAML files in your workspace. You can configure this in your workspace or user settings.
Default File Patterns:
"maestroWorkbench.filePatterns": [
"maestro/**/*.yaml",
"maestro/**/*.yml",
"**/.maestro/**/*.yaml",
"**/.maestro/**/*.yml"
]
To modify these patterns, navigate to your VS Code settings and update the maestroWorkbench.filePatterns configuration.
maestroWorkbench.filePatterns
: Glob patterns to locate Maestro filesmaestroWorkbench.defaultDevice
: Default device to run tests onmaestroWorkbench.envVariables
: Environment variables for test execution
- Device selection is required for each test run if no default device is set
- Some iOS simulator features may require Xcode to be running
Contributions are welcome! Please fork the repository and submit pull requests for any enhancements or bug fixes. For detailed guidelines, refer to our CONTRIBUTING.md.
If you find Maestro Workbench useful, please consider starring our repository on GitHub! Your support helps us continue to improve the extension.
This extension is licensed under the MIT License.
For detailed documentation and contribution guidelines, please visit the GitHub repository.