ExtrabbitCode.Inventor.Testbench.Runner 0.2.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package ExtrabbitCode.Inventor.Testbench.Runner --version 0.2.1
                    
NuGet\Install-Package ExtrabbitCode.Inventor.Testbench.Runner -Version 0.2.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExtrabbitCode.Inventor.Testbench.Runner" Version="0.2.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExtrabbitCode.Inventor.Testbench.Runner" Version="0.2.1" />
                    
Directory.Packages.props
<PackageReference Include="ExtrabbitCode.Inventor.Testbench.Runner" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ExtrabbitCode.Inventor.Testbench.Runner --version 0.2.1
                    
#r "nuget: ExtrabbitCode.Inventor.Testbench.Runner, 0.2.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ExtrabbitCode.Inventor.Testbench.Runner@0.2.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ExtrabbitCode.Inventor.Testbench.Runner&version=0.2.1
                    
Install as a Cake Addin
#tool nuget:?package=ExtrabbitCode.Inventor.Testbench.Runner&version=0.2.1
                    
Install as a Cake Tool

ExtrabbitCode.Inventor.Testbench

Write tests for Inventor. Your addins are no longer untested.

Start here: Visual HTML handbook or Markdown guide. Both cover NuGet setup, logic tests, Inventor COM, fixtures, UI + COM, AI review, artifacts, version selection, and loading the compiled DLL into Testbench.

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 Multitool feature contract:

dotnet run --project .\src\ExtrabbitCode.Inventor.Testbench.Console -- scenario --file .\scenarios\multitool-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 Multitool owns its tests and consumes Testbench as NuGet/tool packages, see docs/nuget-consumption.md.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.3 243 7/26/2026
0.2.2 117 7/25/2026
0.2.1 108 7/19/2026
0.2.0 103 7/19/2026