tui-test

द्वारा microsoft

कमांड लाइन से tui-test cli के साथ एक वास्तविक टर्मिनल को चलाएँ, निरीक्षण करें, उस पर assert करें, रिकॉर्ड करें और देखें। शेल (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

microsoft की और Skills

oss-growth
microsoft
OSS ग्रोथ हैकर व्यक्तित्व
agent-framework-azure-ai-py
microsoft
Microsoft Agent Framework Python SDK (agent-framework-azure-ai) का उपयोग करके Azure AI Foundry एजेंट बनाएं। AzureAIAgentsProvider के साथ स्थायी एजेंट बनाते समय, होस्टेड टूल्स (कोड इंटरप्रेटर, फ़ाइल खोज, वेब खोज) का उपयोग करते समय, MCP सर्वर एकीकृत करते समय, वार्तालाप थ्रेड प्रबंधित करते समय, या स्ट्रीमिंग प्रतिक्रियाएँ लागू करते समय उपयोग करें। फ़ंक्शन टूल्स, संरचित आउटपुट और मल्टी-टूल एजेंट शामिल हैं।
development
airunway-aks-setup
microsoft
AI Runway को AKS पर सेट करें — बेयर क्लस्टर से चल रहे मॉडल तक। इसमें क्लस्टर सत्यापन, कंट्रोलर इंस्टॉल, GPU मूल्यांकन, प्रोवाइडर सेटअप, और पहली डिप्लॉयमेंट शामिल है। कब: "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
Azure Application Insights के साथ वेबऐप्स को इंस्ट्रूमेंट करने के लिए मार्गदर्शन। टेलीमेट्री पैटर्न, SDK सेटअप, और कॉन्फ़िगरेशन संदर्भ प्रदान करता है। WHEN: ऐप को कैसे इंस्ट्रूमेंट करें, App Insights SDK, टेलीमेट्री पैटर्न, App Insights क्या है, Application Insights मार्गदर्शन, इंस्ट्रूमेंटेशन उदाहरण, APM सर्वोत्तम अभ्यास।
devops
applicationinsights-web-ts
microsoft
ब्राउज़र/वेब ऐप्स को Application Insights JavaScript SDK (@microsoft/applicationinsights-web) से इंस्ट्रूमेंट करें। Real User Monitoring (RUM) के लिए उपयोग करें — पेज व्यू, क्लिक, AJAX/fetch निर्भरताएँ, अपवाद, कस्टम इवेंट, और बैकएंड OpenTelemetry ट्रेस से सहसंबंधित ब्राउज़र-साइड GenAI एजेंट ट्रेस। SDK Loader Script और npm सेटअप, फ्रेमवर्क एक्सटेंशन (React, React Native, Angular), Click Analytics, टेलीमेट्री इनिशियलाइज़र, और ब्राउज़र से उत्सर्जित एजेंट/टूल/मॉडल स्पैन के लिए OTel GenAI सिमेंटिक कन्वेंशन शामिल हैं।
devops
azure-ai-anomalydetector-java
microsoft
Azure AI Anomaly Detector SDK for Java के साथ एनोमली डिटेक्शन एप्लिकेशन बनाएं। यूनीवेरिएट/मल्टीवेरिएट एनोमली डिटेक्शन, टाइम-सीरीज़ विश्लेषण, या AI-संचालित मॉनिटरिंग लागू करते समय उपयोग करें।
development
azure-ai-language-conversations-py
microsoft
<text> azure-ai-language-conversations Python SDK का उपयोग करके संवादात्मक भाषा समझ (CLU) लागू करें। ConversationAnalysisClient के साथ काम करते समय उपयोग करें ताकि वार्तालाप के इरादे और संस्थाओं का विश्लेषण किया जा सके, NLP सुविधाएँ बनाई जा सकें, या अनुप्रयोगों में भाषा समझ को एकीकृत किया जा सके। </text>
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 for Python। ML वर्कस्पेस, जॉब्स, मॉडल, डेटासेट, कंप्यूट और पाइपलाइन के लिए उपयोग करें। ट्रिगर्स: "azure-ai-ml", "MLClient", "workspace", "model registry", "training jobs", "datasets"।
development