Search Results for

    testaruda Adapter

    TL;DR: titi ships a JSON-over-stdio adapter for testaruda integration. It builds the MonorepoGraph once at startup and answers handshake/discover/static-deps/fingerprint/run-args/ingest/shutdown commands from in-memory state.

    titi ships a built-in testaruda adapter subcommand (titi testaruda-adapter) that speaks the testaruda JSON-over-stdio adapter protocol. This allows testaruda to use titi's MSBuild-accurate project graph as its C#/.NET static-dependency source.

    Protocol

    The adapter reads one JSON request per line from stdin and writes one JSON response per line to stdout. Each request has a command field and a params object.

    Example: handshake

    → {"command":"handshake","params":{}}
    ← {"result":{"name":"titi","version":"0.1.0","protocol":1,"languages":["csharp"],"granularity":"method","capabilities":{"symbol_model_complete":true,"fingerprinting":true,"runtime_edges":false}}}
    

    Example: discover

    → {"command":"discover","params":{}}
    ← {"result":[{"node_id":"LibTest.MyTests.Test1","suite_kind":"LibTest.MyTests","file":"/asm/LibTest.dll"}]}
    

    The response uses the canonical testaruda adapter protocol format: result is a direct array of items with node_id, suite_kind, and file fields. node_id is the unique test identifier; suite_kind is the test class name (per the testaruda adapter protocol).

    Commands

    Command Description Params
    handshake Capability advertisement {}
    discover Enumerate test items (method-level) {}
    static-deps Compute affected test items changed_files, affected_projects
    fingerprint Return project fingerprints {}
    run-args Generate test command test_ids
    ingest Parse TRX results trx_path, cobertura_path
    shutdown Graceful shutdown {}

    Granularity

    The adapter operates at method-level granularity: each test item is a single test method, not a whole assembly. The handshake advertises symbol_model_complete: true and runtime_edges: false, meaning titi provides a complete static symbol model but does not trace runtime call edges.

    Known Limitations

    • Startup discovery: The adapter builds the MonorepoGraph once during handshake (in-memory) and then discovers test items for all test projects by running dotnet test --list-tests on cold cache. Results are cached in .titi/test-cache/items/ so subsequent invocations are fast. Test projects are detected via well-known test-SDK package references (xunit, NUnit, MSTest, Microsoft.NET.Test.Sdk) when the MSBuild IsTestProject property is not explicitly set.
    • Framework detection: The adapter reports xunit as the framework for all test projects at the project level. NUnit/MSTest projects are normalized to xunit in the handshake; method-level framework detection uses the VSTest executor URI.
    • CLR cold-start: The .NET CLR process startup time is a distinct cost from the graph-build budget. Minimum adapter timeout: 30s for small repos, 60s for large repos.

    Configuration

    The adapter requires no additional titi configuration — it reuses the existing titi.config.json and builds the project graph from source at startup. The testaruda-side config defaults (.csproj/.sln/.slnx → titi testaruda-adapter mapping, dotnet-project detection) are in the testaruda repository (v0.2.5+).

    • Edit this page
    In this article
    Back to top Copyright © titi contributors