ToolCallingTests.cscsharp

Documentation

Version 3 design tests

Automated checks for chat, history, and Kokoro TTS (sanitizer + optional live speech).

Quick run

python src/Version3/DesignTests/run-design-tests.py
python src/Version3/DesignTests/run-design-tests.py --live
.\src\Version3\DesignTests\run-design-tests.ps1 -Live

What runs

| Suite | Needs network | Covers | |-------|----------------|--------| | ChatHistoryStoreTests | No | Same as V1 history XML | | OllamaClientHistoryTests | No | Client save/load | | KokoroTtsSanitizerTests | No | Markdown/emoji/URL stripping for speech | | OllamaLiveTests | Yes (--live) | Ollama chat | | KokoroTtsLiveTests | Yes (--live) | Kokoro model load + SpeakAsync |

First Kokoro live run may download ~320MB of model weights.

Console video (testers)

Record Version 3 console sessions (chat + TTS + history):

python src/TestManager/test_manager.py record v2 chat-tts --build

See src/TestManager/README.md.

All versions

python src/run-all-design-tests.py
python src/run-all-design-tests.py --live
using Agent.Addons;using Agent.Addons.Tools;using Agent.Core.ToolCalling;using Xunit;namespace Agent.Core.DesignTests;public class ToolCallingTests{    [Fact]    public void Default_registry_includes_get_time_and_get_date()    {        var registry = ToolRegistry.CreateDefault();        Assert.True(registry.TryInvoke(BuiltInTools.GetTimeName, "{}", out string time));        Assert.False(string.IsNullOrWhiteSpace(time));        Assert.True(registry.TryInvoke(BuiltInTools.GetDateName, "{}", out string date));        Assert.False(string.IsNullOrWhiteSpace(date));    }    [Fact]    public void Unknown_tool_returns_error_message()    {        var registry = ToolRegistry.CreateDefault();        Assert.False(registry.TryInvoke("missing_tool", "{}", out string result));        Assert.Contains("Unknown tool", result);    }    [Fact]    public void Addon_registry_includes_get_weather_example()    {        var registry = ToolRegistry.CreateDefault();        AddonTools.Register(registry);        Assert.True(registry.TryInvoke(GetWeatherTool.Name, """{"city":"London"}""", out string result));        Assert.Contains("London", result);        Assert.Contains("Example weather", result);    }}