DiffEngineTray
June 11, 2025 ยท View on GitHub
DiffEngineTray sits in the Windows tray. For supported snapshot testing libraries, it monitors pending changes in snapshots, and provides a mechanism for accepting those changes. It is intended as an alternative to using the clipboard as an approval mechanism.
NuGet
Installation
dotnet tool install -g DiffEngineTray
Running
Run diffenginetray in a console to start the app.
UI
Grouping
Moves and deletes will be grouped by the containing solution. In the above, the files exist in DiffEngine, so they are grouped under it.
Moves
"Pending Moves" will accept the changes to file3 and file4.
Clicking "file3" or "file4" will accept the changes to file3 or file4 respectively. The drop down will expose extra actions for that change.
Deletes
A test can produce multiple resulting snapshots. If the accepted versions has a different number of snapshots to the current test run, then some of those snapshots need to be deleted. The delete functionality in the tray tool handles this scenario.
"Pending Deletes" will delete file1 and file2.
Clicking "file1" or "file2" will delete file1 or file2 respectively. The drop down will expose extra actions for that change.
Accept all
"Accept all" will accept all pending moves and all pending deletes.
Discard
Discard will clear all currently tracked items.
Purge verified files
Prompts for a directory, and then recursively deletes all *.verified.* in that directory.
Options
Run at startup
Runs DiffEngineTray at system startup.
Open on left
By default, when a diff is opened, the temp file will be on the left and the target file will be on the right. To invert this, select "Open on left".
Max instances to launch
Control the max instances to launch setting.
Discard all HotKey
Registers a system wide HotKey to discard pending:
- Deletes
- Moves
Accept all HotKey
Registers a system wide HotKey to accept pending:
- Deletes
- Moves
Accept all open HotKey
Registers a system wide HotKey to accept pending:
- Deletes
- Moves that are currently open in a diff tool
To limit impact on system resources, the default max concurrent open tool instances is limited to 5.
Accept all open HotKey allows the current batch of open diffs to be accepted.
Currently supported in
- ApprovalTests v5.4.0 and above
- Shouldly v4.0.0 and above
- Verify v6.10.4 and above
Payloads
Add pending move
{
"Type":"Move",
"Temp":"theTempFilePath",
"Target":"theTargetFilePath",
"CanKill":true,
"Exe":"theExePath",
"Arguments":"TheArguments",
"ProcessId":1000
}
Add pending delete
{
"Type":"Move",
"Temp":"theTempFilePath",
"Target":"theTargetFilePath",
"CanKill":true,
"Exe":"theExePath",
"Arguments":"TheArguments",
"ProcessId":1000
}
Logging Directory
%UserProfile%\.dotnet\tools\.store\diffenginetray\{VERSION}\diffenginetray\{VERSION}\tools\net8.0\any\logs
For example:
C:\Users\simon\.dotnet\tools\.store\diffenginetray\9.0.0\diffenginetray\9.0.0\tools\net8.0\any\logs