tui-test

Steuern, inspizieren, prüfen, aufzeichnen und beobachten Sie ein echtes Terminal von der Kommandozeile aus mit der tui-test-CLI. Verwenden Sie es beim Ausführen von Shells (bash, zsh, fish, PowerShell, …)

npx skills add https://github.com/microsoft/tui-test --skill tui-test

tui-test

Use tui-test to control and test a real terminal.

Pick an API

ContextUseReference
Agent or shell workflowCLICLI
Python codetui_testPython
JavaScript or TypeScript@microsoft/tui-testJavaScript
Rust codetui-test-rsRust
Common tasksCurrent project languageRecipes

Use the library that matches the project. Use the CLI when the terminal must persist across separate commands or be watched with monitor.

CLI and library sessions do not share state.

CLI

tui-test run my-app
tui-test expect text "Ready"
tui-test click text "Continue"
tui-test expect text "Done"
tui-test close

Run tui-test agent-context for exact command and option names.

Python

from tui_test import TuiTest

async with TuiTest.ephemeral() as terminal:
    await terminal.run("my-app")
    await terminal.get_by_text("Ready").expect()
    await terminal.get_by_text("Continue").click()

JavaScript

import { TuiTest } from "@microsoft/tui-test";

const terminal = TuiTest.ephemeral();
try {
  await terminal.run("my-app");
  await terminal.getByText("Ready").expect();
  await terminal.getByText("Continue").click();
} finally {
  await terminal.closeQuiet();
}

Locators

Use text and style locators for visible terminal state.

save = (
    terminal
    .get_by_text("Settings")
    .get_by_text("Save", direction="after")
    .unique()
)

await save.click()
  • Use first(), last(), nth(), or unique() before an action when text repeats.
  • Use get_by_style() or getByStyle() for colors and attributes.
  • Use direction="within", "after", or "before" for relative matches.
  • Use locations() or count() for immediate reads.
  • Use wait(), expect(), or click() when the app may still be changing.

Wait for state

NeedUse
Visible or hidden textLocator wait() or expect()
Submitted command finishedwait command, wait_command(), waitCommand()
Program exitedwait exit, wait_exit(), waitExit()
Shell prompt readywait ready, wait_ready(), waitReady()
Screen stopped changingwait idle, wait_idle(), waitIdle()
Clipboard changed or matchedwait clipboard, wait_clipboard(), waitClipboard()
Bell firedwait bell, wait_bell(), waitBell()

Do not use a fixed sleep when a wait can describe the state.

Keep tests stable

  • Give parallel tests unique sessions.
  • Use open for shell commands and run for an app.
  • Assert the exit code separately from visible text.
  • Keep the shell, terminal size, cwd, environment, and timeouts explicit when they affect output.
  • Use semantic mouse buttons: left, middle, or right.
  • Close every session. Prefer the Python and JavaScript test helpers.

Capture output

Use screenshot for text or SVG. Use record for APNG, GIF, MP4, or asciinema. Use recording mode on-failure for test artifacts.

References

Mehr Skills von microsoft

oss-growth
microsoft
OSS-Wachstums-Hacker-Persona
agent-framework-azure-ai-py
microsoft
Erstellen Sie Azure AI Foundry-Agents mit dem Microsoft Agent Framework Python SDK (agent-framework-azure-ai). Verwenden Sie dies beim Erstellen persistenter Agents mit AzureAIAgentsProvider, bei der Nutzung gehosteter Tools (Code-Interpreter, Dateisuche, Websuche), bei der Integration von MCP-Servern, bei der Verwaltung von Konversationsthreads oder bei der Implementierung von Streaming-Antworten. Umfasst Funktionstools, strukturierte Ausgaben und Multi-Tool-Agents.
development
airunway-aks-setup
microsoft
Set up AI Runway on AKS — from bare cluster to running model. Covers cluster verification, controller install, GPU assessment, provider setup, and first deployment. WHEN: "setup AI Runway", "onboard AKS cluster", "install AI Runway", "airunway setup", "deploy model to AKS", "GPU inference on AKS", "KAITO setup on AKS", "run LLM on AKS", "vLLM on AKS", "set up model serving on AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
devops
applicationinsights-web-ts
microsoft
Instrumentieren Sie Browser-/Web-Apps mit dem Application Insights JavaScript SDK (@microsoft/applicationinsights-web). Verwenden Sie es für Real User Monitoring (RUM) – Seitenaufrufe, Klicks, AJAX/Fetch-Abhängigkeiten, Ausnahmen, benutzerdefinierte Ereignisse und browser-seitige GenAI-Agent-Traces, die mit Backend-OpenTelemetry-Traces korreliert werden. Umfasst SDK-Loader-Skript und npm-Setup, Framework-Erweiterungen (React, React Native, Angular), Click Analytics, Telemetrie-Initialisierer und OTel-GenAI-Semantik-Konventionen für Agent-/Tool-/Modell-Spans, die vom Browser ausgegeben werden.
devops
azure-ai-anomalydetector-java
microsoft
Erstellen Sie Anomalieerkennungsanwendungen mit dem Azure AI Anomaly Detector SDK für Java. Verwenden Sie dies bei der Implementierung von univariater/multivariater Anomalieerkennung, Zeitreihenanalyse oder KI-gestützter Überwachung.
development
azure-ai-language-conversations-py
microsoft
Implementieren Sie Conversational Language Understanding (CLU) mit dem azure-ai-language-conversations Python SDK. Verwenden Sie dies, wenn Sie mit ConversationAnalysisClient arbeiten, um Gesprächsabsichten und Entitäten zu analysieren, NLP-Funktionen zu erstellen oder Sprachverständnis in Anwendungen zu integrieren.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 für Python. Verwenden für ML-Workspaces, Jobs, Modelle, Datensätze, Compute und Pipelines. Auslöser: „azure-ai-ml“, „MLClient“, „Workspace“, „Modell-Registry“, „Trainings-Jobs“, „Datensätze“.
development