AgentSkillsCN

tui-test

在代码修改后,根据每项测试与全局超时设置运行TUI测试,支持仅执行冒烟测试、仅执行单元测试,或进行全面测试。

SKILL.md
--- frontmatter
name: tui-test
description: Run Textual TUI tests with appropriate per-test and global timeouts after code changes, with support for smoke-only, unit-only, or full test execution.

TUI Test

Run TUI tests with pytest-xdist parallel execution.

Commands

bash
# Smoke tests only
source venv/bin/activate && timeout 60 pytest -m smoke kubeagle/tests/tui/smoke/ -n 2 -v --tb=short --timeout=30

# Unit tests only
source venv/bin/activate && timeout 120 pytest kubeagle/tests/tui/unit/ -n 2 -v --asyncio-mode=auto --timeout=30 --tb=short

# All TUI tests
source venv/bin/activate && timeout 120 pytest kubeagle/tests/tui/ -n 2 -v --asyncio-mode=auto --timeout=30 --tb=short

Timeouts

TypePer-testGlobal
Smoke30s60s
Unit30s120s

Kill stuck runs when needed:

bash
pkill -f pytest