ExtrabbitCode.Inventor.Testbench.Runner
0.2.3
dotnet add package ExtrabbitCode.Inventor.Testbench.Runner --version 0.2.3
NuGet\Install-Package ExtrabbitCode.Inventor.Testbench.Runner -Version 0.2.3
<PackageReference Include="ExtrabbitCode.Inventor.Testbench.Runner" Version="0.2.3" />
<PackageVersion Include="ExtrabbitCode.Inventor.Testbench.Runner" Version="0.2.3" />
<PackageReference Include="ExtrabbitCode.Inventor.Testbench.Runner" />
paket add ExtrabbitCode.Inventor.Testbench.Runner --version 0.2.3
#r "nuget: ExtrabbitCode.Inventor.Testbench.Runner, 0.2.3"
#:package ExtrabbitCode.Inventor.Testbench.Runner@0.2.3
#addin nuget:?package=ExtrabbitCode.Inventor.Testbench.Runner&version=0.2.3
#tool nuget:?package=ExtrabbitCode.Inventor.Testbench.Runner&version=0.2.3
<img src="assets/icon/TestbenchLab-1024-light.png" alt="" width="96" align="left" hspace="12" />
ExtrabbitCode.Inventor.Testbench
Write tests for Inventor. Your addins are no longer untested.
<br clear="left" />
Double-click any test to open the focus view: result, timing, tags, the test log, its source, and every artifact it captured. Here a UI test's recorded Inventor automation tree:
Artifacts render inline, so an evidence screenshot taken during a run is reviewable without leaving the app:
Start here: the developer handbook - one page covering setup, the four test kinds, every helper API in detail, and a cookbook of 16 worked Inventor test scenarios with the code that achieves each one. The Markdown guide is the shorter text version.
Packages
| Package | Version | Description |
|---|---|---|
| ExtrabbitCode.Inventor.Testbench | Test attributes, assertions, Inventor COM helpers, fixtures | |
| ExtrabbitCode.Inventor.Testbench.Runner | Discovery, execution, scenario parsing, reporting | |
| ExtrabbitCode.Inventor.Testbench.Evidence | Screenshots, MP4 recordings, text artifacts | |
| ExtrabbitCode.Inventor.Testbench.UI | Windows UI Automation helpers for addin tests | |
| ExtrabbitCode.Inventor.Testbench.Tool | dotnet tool CLI for running suites |
This repository currently contains the first prototype slice:
- code-defined tests through
[InventorFact] - a local runner that discovers and executes test assemblies
- fixture-copy behavior that protects original Inventor files
- JUnit output for nightly/scheduled runs
- a tiny YAML-shaped scenario manifest
- a WinUI 3 app shell for the future visual Testbench
Try the local smoke run
Build the SDK-only projects and sample tests:
dotnet build .\ExtrabbitCode.Inventor.Testbench.slnx
Discover sample tests:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- discover `
--assembly .\samples\ExtrabbitCode.Inventor.Testbench.SampleTests\bin\Debug\net8.0\ExtrabbitCode.Inventor.Testbench.SampleTests.dll
Run the first scenario:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- scenario --file .\scenarios\local-smoke.tb.yaml
Run the first simulated feature contract:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- scenario --file .\scenarios\filename-export-contract.tb.yaml
Results are written under .\results\.
List installed Inventor versions:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- versions
Launch the WinUI 3 shell:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.App
The app can discover and run the sample smoke tests after the solution has been built once.
External test DLLs can be added through the sidebar picker or on the command
line with repeatable --add-assembly <path> arguments. Assemblies that
reference xunit are shown through metadata discovery and executed out of
process via dotnet test (the test project must reference the
JunitXml.TestLogger package), so existing xunit suites of an addin repository
appear in the Testbench without a rewrite - even when they target a newer
framework than the app. See docs/getting-started.md section 9b.
Write an Inventor UI test
Reference the ExtrabbitCode.Inventor.Testbench.UI library and mark UI tests
explicitly. They are discovered separately from logic/API tests:
[InventorUiFact("The addin ribbon is accessible", Tags = ["ui", "smoke"])]
public void Addin_ribbon_is_accessible(InventorTestContext context)
{
using InventorUiSession ui = InventorUiSession.Attach(context);
var button = ui.RequireByName("My Addin Command", ControlType.Button);
button.AsButton().Invoke();
context.AddArtifacts(ui.CaptureDiagnostics(
context.TestWorkingDirectory,
"addin-command"));
}
The Testbench app has All, Logic, UI, and AI tabs. Selecting UI filters both discovery and the run request sent to the Inventor addin agent. Screenshots and UI Automation trees are persisted as normal test artifacts.
See docs/ui-automation.md for selectors, execution requirements, and the
planned AI-assisted layer.
Try the agent handshake
Start the standalone runner agent in one terminal:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Agent
Ping it from another terminal:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- agent-ping
Stop it through the pipe:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- agent-shutdown
The Inventor addin project uses Autodesk.Inventor.Sdk and starts the same
runner pipe host from StandardAddInServer.Activate. The standalone agent is
there so the pipe protocol can be developed and tested before loading anything
into Inventor.
Try the Inventor addin bridge
Build first:
dotnet build .\ExtrabbitCode.Inventor.Testbench.slnx
Install the dev addin manifest for one Inventor version:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- addin-install --version 2027
This also pre-allows the Testbench addin GUID in the current user's Inventor
AddInLoadRules file so the first launch does not stop on the normal addin
trust prompt. Existing rule files are backed up before modification. Use
--skip-unblock if you only want to write the .addin manifest.
Repair only the load rule without reinstalling the manifest:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- addin-unblock --version 2027
Remove the saved Testbench trust rule to simulate a first run:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- addin-remove-trust --version 2027
Launch Inventor and wait for the addin-hosted agent:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- launch-inventor --version 2027 --wait-agent
Or do both in one command:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- launch-inventor --version 2027 --install-addin --wait-agent
launch-inventor also enforces the same first-load unblock rule unless
--skip-unblock is passed.
Run the full reset/redeploy smoke and close Inventor after the handshake:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- launch-inventor --version 2027 --install-addin --wait-agent --close-on-success
Add --force-close when running in an isolated smoke test and Inventor should
be terminated if the normal window close does not complete before
--close-timeout-ms.
Remove the dev addin manifest:
dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- addin-uninstall --version 2027
By default the manifest is written to the user addins folder for that Inventor
version, for example %APPDATA%\Autodesk\Inventor 2027\Addins. Use
--scope machine for %PROGRAMDATA%\Autodesk\Inventor Addins, or --target-dir
for safe smoke testing. A --target-dir install does not patch real Inventor
load rules.
The official administrator-controlled mechanism is
%INSTALLDIR%\Preferences\AddInLoadRules.xml, which supports trusted paths and
publisher rules. The prototype uses the per-user load-rule file because it is
the same state Inventor writes after the user allows an addin once.
Current boundaries
The runner supports local tests plus an addin-hosted Inventor adapter, named-pipe test runs, 2025–2027 selection, UI Automation, artifacts, and JUnit. AI tests are discoverable but the provider-neutral visual-review execution contract is not implemented yet.
See docs/architecture.md for the current shape.
For how outcomes are verified against a graphical application - driving the
Inventor object model instead of the screen, and why no Playwright-style UI
driver is needed - see docs/testing-strategy.md.
For the intended cross-repo workflow where an addin repository owns its tests and consumes
Testbench as NuGet/tool packages, see docs/nuget-consumption.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- ExtrabbitCode.Inventor.Testbench (>= 0.2.3)
- System.Reflection.MetadataLoadContext (>= 10.0.10)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.