CodeVetter · Repo Unpack · Testing signals
microsoft/terminal
Tests are TAEF-based C++ unit tests (TEST_CLASS/TEST_METHOD) plus WexTaef te.exe for the settings model, feature tests, a fuzzing harness, and a small C# WinAppDriver UIA suite. tools/runut.cmd enumerates the unit test DLLs: Conhost.Unit.Tests, TextBuffer.Unit.Tests, Terminal.Core.Unit.Tests, ConParser/ConAdapter.Unit.Tests, Types, til.unit.tests, Terminal.App.Unit.Tests, Control.Unit.Tests, TerminalApp.LocalTests, and SettingsModel.Unit.Tests. CI (Azure Pipelines) gates on code formatting and runs tests per-platform. Coverage is strong for settings serialization, the parser/adapter, buffer, and control core; the Win32 windowing layer (WindowEmperor/AppHost/IslandWindow) and remoting have no dedicated unit tests.
- Unit tests run under TAEF via tools/runut.cmd, which invokes %TAEF% over ten test DLLs and then te.exe for SettingsModel.Unit.Tests; the comment says to keep the list in sync with tools/tests.xml.
- Settings model tests (src/cascadia/UnitTests_SettingsModel) cover deserialization, serialization round-trips, keybindings, profiles, color schemes, themes, new-tab menu, application state, and media resources — e.g. SerializationTests.cpp TEST_METHODs GlobalSettings, Profile, ColorScheme, Actions, CascadiaSettings, RoundtripReloadEnvVars.
- TerminalCore unit tests cover TerminalApiTest, selection, scrolling, screen-size limits, buffer tests, and input; Control tests cover ControlCore and ControlInteractivity with MockConnection/MockControlSettings fakes.
- Conhost-side tests: src/host/ut_host exercises screen buffer, input buffer, history, aliases, VtIo, console arguments; src/til/ut_til covers the til utility library; adapter/parser have ut_adapter and ConParser.Unit.Tests.
- TerminalApp has 'LocalTests' that run inside a TestHostApp cppwinrt harness (LocalTests_TerminalApp/TestHostApp) rather than the real packaged app, which is why AppLogic::Current()/CurrentAppSettings() have try/catch guards for the non-App case.
- UI automation tests exist as a C# WinAppDriver suite (src/cascadia/WindowsTerminal_UIATests, SmokeTests.cs, WindowsTerminal.UIA.Tests.csproj) run via tools/runuia.cmd; WinAppDriver itself is vendored under dep/WinAppDriver.
- Fuzzing is first-class: src/host/ft_fuzzer and src/terminal/parser/ft_fuzzer/ft_fuzzwrapper provide harnesses, 'Fuzzing' is a solution build type in OpenConsole.slnx, and build/pipelines/fuzz.yml + doc/fuzzing.md document the pipeline.
- Feature/integration tests live in ft_* dirs (src/host/ft_host, ft_integrity, ft_uia) run by tools/runft.cmd; additional manual test tools exist under src/tools (vttests, texttests, RenderingTests, echokey).
- CI runs a dedicated code-format job (templates-v2/job-check-code-format.yml) plus AuditMode and per-platform builds; doc/ changes are path-excluded from CI triggers.
- No unit test project exists for the WindowsTerminal.exe windowing layer (WindowEmperor, AppHost, IslandWindow, handoff serialization) — coverage there relies on the UIA smoke suite; this is an inference from the test-DLL list in runut.cmd. (inferred)