用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Arete-Consortium/ai-skills --skill e2e命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Intelligent CI failure diagnosis and guided remediation for GitHub Actions, GitLab CI, and local builds
Pre-execution mapping of codebases, document collections, or problem spaces. Runs BEFORE any Gorgon workflow to give all agents shared situational awareness
Investigative methodology for analyzing document collections — provenance analysis, anomaly detection, redaction detection, and cross-document validation
正在显示 SKILL.md
| name | e2e |
| description | End-to-End Test Setup |
| lifecycle | experimental |
Set up end-to-end testing for applications.
/e2e # Analyze project, suggest e2e setup
/e2e web # Web app e2e (Playwright/Selenium)
/e2e api # API e2e tests
/e2e cli # CLI application tests
pip install pytest-playwright
playwright install
[pytest]
testpaths = tests/e2e
asyncio_mode = auto
# tests/e2e/test_login.py
import pytest
from playwright.sync_api import Page, expect
def test_login_page_loads(page: Page):
"""Test login page renders correctly."""
page.goto("/login")
expect(page.locator("h1")).to_contain_text("Login")
expect(page.locator("input[name='username']")).to_be_visible()
expect(page.locator("input[name='password']")).to_be_visible()
def test_successful_login(page: Page):
"""Test user can log in with valid credentials."""
page.goto("/login")
page.fill("input[name='username']", "testuser")
page.fill("input[name='password']", "testpass")
page.click("button[type='submit']")
# Should redirect to dashboard
expect(page).to_have_url("/dashboard")
expect(page.locator(".welcome-message")).to_contain_text("Welcome")
def test_invalid_login_shows_error(page: Page):
"""Test error message for invalid credentials."""
page.goto("/login")
page.fill("input[name='username']", "wrong")
page.fill("input[name='password']", "wrong")
page.click("button[type='submit']")
expect(page.locator(".error-message")).to_be_visible()
# tests/e2e/test_api.py
import pytest
import httpx
BASE_URL = "http://localhost:8000"
@pytest.fixture
def client():
with httpx.Client(base_url=BASE_URL) as client:
yield client
def test_health_endpoint(client):
"""Test health check endpoint."""
response = client.get("/health")
assert response.status_code == 200
assert response.json()["status"] == "healthy"
def test_create_and_get_user(client):
"""Test full user lifecycle."""
# Create user
create_response = client.post("/users", json={
"username": "newuser",
"email": "new@example.com"
})
assert create_response.status_code == 201
user_id = create_response.json()["id"]
# Get user
get_response = client.get(f"/users/{user_id}")
assert get_response.status_code == 200
assert get_response.json()["username"] == "newuser"
# Cleanup
client.delete(f"/users/{user_id}")
# tests/e2e/test_cli.py
import subprocess
def test_cli_help():
"""Test --help flag."""
result = subprocess.run(
["myapp", "--help"],
capture_output=True,
text=True
)
assert result.returncode == 0
assert "Usage:" in result.stdout
def test_cli_version():
"""Test --version flag."""
result = subprocess.run(
["myapp", "--version"],
capture_output=True,
text=True
)
assert result.returncode == 0
assert "1." in result.stdout
def test_cli_process_file(tmp_path):
"""Test file processing."""
# Create test file
test_file = tmp_path / "input.txt"
test_file.write_text("test content")
result = subprocess.run(
["myapp", "process", str(test_file)],
capture_output=True,
text=True
)
assert result.returncode == 0
# .github/workflows/e2e.yml
name: E2E Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e ".[dev]"
playwright install --with-deps
- name: Start application
run: |
myapp serve &
sleep 5
- name: Run E2E tests
run: pytest tests/e2e -v
When /e2e is invoked: