Automation Extension Development
Automation Extensions provide custom test step types that appear in the Aethrix test automation step picker alongside built-in steps.
Note: This section is a placeholder. Detailed API reference and examples will be added once the Automation Extension SDK is finalized. Check the GitHub repository for the latest development status.
Overview
An Automation Extension implements the ITestStep interface from Aethrix.Automation, defining:
- Step configuration model (properties exposed in the UI)
- Execution logic (
Executemethod) - Diagnostics and logging
Custom step icons
Every step type in the Add-Step menu, the item presenter and the search palette renders through one funnel (TestAutomationViewModel.GetImageSource). By default a step shows the generic VS2026.Step glyph. A plugin can declare its own icon — the artwork lives inside the plugin's own assembly, so nothing needs to be installed into Studio.
Quickest path: ship one icon dictionary and tag the steps
-
Add a resource dictionary to the extension project (it is compiled into the assembly as an Avalonia resource):
<!-- Icons/Icons.axaml --><ResourceDictionary xmlns="https://github.com/avaloniaui"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"><DrawingGroup x:Key="Db.MySql" Transform="0.8,0,0,0.8,-1.6,-1.6"><GeometryDrawing Brush="#4479A1" Geometry="M16.405 5.501c-.115 0 ..." /></DrawingGroup></ResourceDictionary> -
Tag each step type:
using Aethrix.Core.Services.Attributes;[IconKey("Db.MySql", ResourceUri = "avares://Aethrix.Database.Providers/Icons/Icons.axaml")]public sealed class MySqlQueryTestStep : AssertionStepBase { ... }
Studio merges the referenced dictionary into the application resources when the extension loads (once per dictionary, on the extension event plus a startup sweep), and the key resolves everywhere a step icon shows. No Studio-side registration is needed. Steps whose icon is an in-box glyph can still use the plain form — [IconKey("VS2026.SQLDatabase")] resolves against the host's own dictionary.
Drawing the icon (16×16 cell)
The step menu renders icons in a 16×16 cell. Conventions that make artwork survive that size:
-
Draw on a 24-unit grid and place it with the
DrawingGroup'sTransform. The transform is a Matrix — six comma-separated numbersM11,M12,M21,M22,dx,dy(scale-x, 0, 0, scale-y, offset-x, offset-y), not a CSSscale()string. Fit the ink to the0..16cell and keep the aspect uniform. -
Fill beats line art at this size. A detailed vendor mark (wordmarks, thin-featured animals) dissolves into ~1px strokes at 16px; a bold single silhouette stays readable. Measure the parsed ink bounds and verify by rendering the icon at its real size before shipping.
-
Theme-tune colors when they need to read on both surfaces. Declare
Light/Darkvariants in the dictionary'sThemeDictionariesand reference them with{DynamicResource ...}— Studio re-resolves them on theme switch. Steps' geometry merges theme-free, but brushes this sharp stay legible on both the dark and the white menu surfaces:<ResourceDictionary.ThemeDictionaries><ResourceDictionary x:Key="Light"><SolidColorBrush x:Key="Brush.MySql" Color="#3A6790" /></ResourceDictionary><ResourceDictionary x:Key="Dark"><SolidColorBrush x:Key="Brush.MySql" Color="#62A0D8" /></ResourceDictionary></ResourceDictionary.ThemeDictionaries> -
The icon stays merged for the session — an extension runtime update that changes icons applies on the next Studio start.
Reference
[IconKey(string iconKey, string? ResourceUri = null)]—Aethrix.Core.Services.Attributes.iconKeyis the dictionary key;ResourceUriis the optionalavares://URI of the dictionary that carries it (absent for host in-box keys). Steps without the attribute keep the genericVS2026.Stepglyph.- Dictionary shape: the value of each key is a
DrawingGroup(aDrawingImageis accepted too); geometry rides verbatim on its native grid, all placement isTransform, all color isBrush.
Third-party artwork and licensing
If the icon is not your own drawing, its license travels with the pack:
- Ship a
LICENSE-NOTICE.txt(or similar) inside the .pkg: declare it in the pack definition'sFileslist. Never add non-DLL files toAssemblyFiles— that list is loaded as assemblies and a text file there fails the load. - Font/icon collections carry their own obligations. Example: ForkAwesome glyphs are SIL OFL 1.1 — redistribution must carry the OFL notice and derivatives stay under the same license; the wrapper code may carry a separate MIT attribution. Simple Icons is CC0 (no obligations). Vendor logos additionally grant no trademark rights: using a vendor's mark to label your driver for that vendor is nominative use, but imply nothing about endorsement.
- A reference implementation of all of the above (dictionary, theme brushes, notice file,
definition.jsonwiring) is theAethrix.Database.Providerspack in theaethrix-extensionsrepository.