WinTrace.Core 0.8.1

dotnet add package WinTrace.Core --version 0.8.1
                    
NuGet\Install-Package WinTrace.Core -Version 0.8.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="WinTrace.Core" Version="0.8.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WinTrace.Core" Version="0.8.1" />
                    
Directory.Packages.props
<PackageReference Include="WinTrace.Core" />
                    
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 WinTrace.Core --version 0.8.1
                    
#r "nuget: WinTrace.Core, 0.8.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 WinTrace.Core@0.8.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=WinTrace.Core&version=0.8.1
                    
Install as a Cake Addin
#tool nuget:?package=WinTrace.Core&version=0.8.1
                    
Install as a Cake Tool

WinTrace

NuGet CI License

Playwright-style traces for Windows desktop UI tests. When a test fails, open one HTML file and see every step: screenshots before and after, timings, the error and stack trace, the UI Automation tree at the moment of failure, and an optional screen recording synced to the steps.

Works with WinAppDriver and NovaWindowsDriver (any Appium/Selenium Windows driver), and with any test framework: MSTest, NUnit, xUnit.

WinTrace viewer: step list, timeline, failure banner, before/after screenshots and video

Why

Desktop UI tests fail with messages like "An element could not be located". Finding out why means re-running the test and watching it. WinTrace records what happened, so the trace shows which step failed, what the screen looked like and what the UI tree actually contained. A typo in a locator stands out at once:

UI tree picker: hover the screenshot to highlight elements and copy their locator

Install

dotnet add package WinTrace.Appium        # adapter for WinAppDriver / NovaWindowsDriver (brings WinTrace.Core)
dotnet tool install -g WinTrace.Cli       # optional: wintrace show / summary

Five-minute setup (MSTest)

using WinTrace;
using WinTrace.Appium;

[TestClass]
public class CustomerFormTests
{
    public TestContext TestContext { get; set; } = null!;
    TraceSession _trace = null!;

    [TestInitialize]
    public void Init() =>
        _trace = new TraceSession(TestContext.TestName!, new AppiumTraceSource(() => Driver));

    [TestMethod]
    public void SubmitCustomer()
    {
        var rec = _trace.Recorder;
        using (rec.Group("Fill in form"))
        {
            rec.SendKeys(rec.Find(Driver, By.Name("Customer name")), "Ada Lovelace");
            rec.Click(rec.Find(Driver, MobileBy.AccessibilityId("btnSave")));
        }
        rec.Step("submit form", "toolbar/Submit", () => page.Submit());   // any code can be a step
    }

    // Saved only when the test fails, and attached to the .trx so CI publishes it with the results.
    [TestCleanup]
    public void Done() =>
        _trace.Finish(TestContext.CurrentTestOutcome != UnitTestOutcome.Passed, TestContext.AddResultFile);
}

A failing run writes TestResults/WinTrace/<test>_<time>_failed.zip and a .html next to it. Open the HTML in any browser.

After the run

wintrace report <folder> --history <archive> --trx <TestResults> summarizes a whole run: failures grouped by cause, each marked new, recurring or intermittent against earlier runs, TRX totals, environment warnings. Inside Azure Pipelines it goes straight to the run's Summary tab. See Run report.

Web + desktop in one trace

Tests that use Playwright for a web app and WinAppDriver for a desktop app can merge the Playwright trace into the WinTrace one: one timeline with web and desktop steps, browser console errors and failed requests, and the original Playwright trace kept whole to open in Playwright's viewer (DOM snapshots, network, console). _trace.Recorder.ImportPlaywrightTrace(path) in the test, or wintrace merge afterwards. See Combining with Playwright.

Using an AI coding agent?

WinTrace is built to be added and used by coding agents (Claude Code, Copilot, Cursor, Codex...). Ask yours:

Add WinTrace to this test project. Follow https://raw.githubusercontent.com/TugaInVegas/WinTrace/main/docs/ai-agents.md

What agents get:

  • A Markdown report and the failure screenshot next to every failed trace: read them, no tool needed.
  • wintrace list TestResults --failed and wintrace inspect TestResults: failed tests after a run and the newest failure in detail (similar elements with suggested locators, stack trace, --tree, --extract, --json).
  • wintrace snapshot --window "<title>" --find <text>: the live UI tree of the running app with a locator per element, to write new tests with real locators instead of guesses; --verify accessibilityid=<id> measures a locator (how many matches, native vs XPath lookup time).
  • wintrace tail for a live view of a running test, and wintrace recover for a trace of a test that crashed or was stopped.
  • Per-step diagnostics (app not responding, app CPU, screen unchanged) and the app's popups in the UI tree, to tell a wrong locator from a busy app.
  • Claude Code skills (integrations) for debugging a failed UI test and writing a new one, and an llms.txt (also inside each package).

Documentation

Guide What it covers
AI agents Recipe for coding agents to integrate WinTrace, and to debug failures from traces
Getting started MSTest, NUnit and xUnit setup; page objects; publishing traces from Azure DevOps and GitHub Actions
Using the viewer Timeline, tabs, UI tree picker, keyboard shortcuts, sharing links
Configuration TraceOptions, TraceSession, video, privacy and performance tuning
Run report Summarize a run: failures by cause, new / recurring / intermittent, comparison with the last passing run, Azure DevOps summary
Combining with Playwright Merge Playwright traces into WinTrace traces, keep the originals for Playwright's viewer
Writing an adapter Support another tool (e.g. FlaUI) in two methods
API stability What will not change before 1.0, and how versions are numbered
Trace format What is inside trace.zip, for tools that read it
Troubleshooting Slow snapshots, missing screenshots, video out of sync, highlight offset

Packages

Package Purpose
WinTrace.Core Recorder, TraceSession, trace format, HTML viewer, ffmpeg recorder. netstandard2.0, no UI-automation dependency.
WinTrace.Appium AppiumTraceSource and traced Find, FindAll, Click, SendKeys, Clear.
WinTrace.Cli wintrace list, summary, inspect, show, report, merge, tail, recover for traces, and snapshot for the live UI tree (console or --json, for CI and AI agents).

Contributing

Issues and pull requests are welcome; see CONTRIBUTING.md and the changelog.

License: Apache-2.0

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on WinTrace.Core:

Package Downloads
WinTrace.Appium

WinTrace adapter for Appium-based Windows drivers (WinAppDriver, NovaWindowsDriver).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.1 119 11/2/2026
0.8.0 106 11/2/2026
0.7.1 125 11/2/2026
0.7.0 113 11/2/2026
0.6.0 115 10/31/2026
0.5.0 114 10/30/2026
0.4.0 113 10/30/2026
0.3.0 114 10/30/2026