cli-e2e-testing

Automates Aspire CLI end-to-end tests with Hex1b terminal scripting and deterministic prompts.

6.2k|952|Updated Sep 25, 2023
One-click install
npx skills add https://github.com/microsoft/aspire --skill cli-e2e-testing-microsoft
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-e2e-testing
Source: https://github.com/microsoft/aspire/tree/main/.agents/skills/cli-e2e-testing
Command: npx skills add https://github.com/microsoft/aspire --skill cli-e2e-testing-microsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents brittle, timing-related failures when testing the Aspire CLI by guiding deterministic terminal automation practices and prompt-synchronization patterns.

Core Features & Use Cases

  • Hex1b-based terminal automation for CLI flows: Automates interactive Aspire CLI commands using Hex1bTerminalAutomator patterns suited for real user interactions.
  • Deterministic completion detection with prompt counters: Uses a SequenceCounter convention and prompt-wait helpers to avoid arbitrary sleeps and reduce flakiness.
  • Practical guidance for debugging CI failures: Explains how to interpret asciinema recordings and diagnose common prompt-counter drift issues such as the Y/n input race.

Quick Start

Ask your AI to “Create a new Linux-only Aspire CLI CLI E2E test using Hex1bTerminalAutomator with TemporaryWorkspace and ensure it uses CliE2EAutomatorHelpers.StartRun plus WaitForSuccessPromptAsync for each command.”

Frequently Asked Questions about cli-e2e-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write reliable Aspire CLI end-to-end tests that don't fail randomly in CI?

Reliable Aspire CLI E2E tests use deterministic terminal automation with Hex1bTerminalAutomator, applying a SequenceCounter and prompt-wait helpers to synchronize command completion instead of arbitrary sleeps, preventing brittle timing failures in CI-style terminal-driven scenarios.

How do I automate interactive Aspire CLI commands inside Docker containers for testing?

Automate interactive Aspire CLI commands in Docker using Hex1b-based terminal automation patterns that simulate real user interactions, tracking deterministic prompt completion via CellPatternSearcher-based output matching to assert generated workspace outputs accurately.

Why do my CLI E2E tests fail with prompt-counter drift during Y/n input races?

Prompt-counter drift during Y/n input races occurs when terminal output matching falls out of sync. Diagnose these brittle failures by interpreting asciinema cast recordings to trace SequenceCounter mismatches and apply deterministic prompt-wait helpers to restore synchronization.

What's the best way to debug flaky Aspire CLI E2E test failures in CI pipelines?

The best way to debug flaky Aspire CLI E2E test failures in CI is to review asciinema cast artifacts, which provide terminal session recordings to diagnose common prompt-counter drift issues and timing-related failures during interactive command execution.

Do I need a specific cleanup workflow when running terminal automation for Aspire CLI E2E tests?

Yes, Aspire CLI E2E tests mandate StartRun-based cleanup workflows to ensure deterministic teardown. Combined with TemporaryWorkspace patterns and WaitForSuccessPromptAsync helpers, this guarantees reliable session termination after interactive command execution.