本文へ移動
cccskills
無料GitHub で公開

test:write

Write E2E and unit tests following Rossoctl testing standards

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctlスター 303(GitHub 303 + cccskills 0)

実行スコア 未検証

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.3 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Write Tests

Write tests that follow Rossoctl testing standards.

When to Use

  • Adding a new feature that needs tests
  • Fixing a bug (write regression test first)
  • Improving test coverage for existing code

Test Structure

rossoctl/tests/
├── e2e/
│   ├── common/          # Tests that run on all platforms
│   │   ├── test_agent_*.py
│   │   ├── test_mlflow_*.py
│   │   └── conftest.py
│   ├── conftest.py      # Shared fixtures
│   └── test_*.py        # Platform-specific tests
└── requirements.txt

Test Template

"""Test description - what scenario is being validated."""
import pytest


class TestFeatureName:
    """Tests for [feature] functionality."""

    def test_specific_behavior(self, fixture):
        """Verify [specific behavior] when [condition]."""
        # Arrange
        expected = "specific_value"

        # Act
        result = do_something(fixture)

        # Assert - ALWAYS assert specific values
        assert result.status_code == 200, f"Expected 200, got {result.status_code}"
        assert result.json()["key"] == expected

Standards

  1. One assertion per concept — test one thing per test method
  2. Descriptive names — test_agent_returns_weather_for_valid_city
  3. AAA pattern — Arrange, Act, Assert
  4. Specific assertions — assert x == 42 not assert x
  5. Timeout handling — use pytest.mark.timeout(300) not sleep()
  6. Skip with reason — @pytest.mark.skip(reason="MLflow disabled in Kind")

Fixtures (conftest.py)

Key fixtures available:

@pytest.fixture
def agent_url():
    """Agent URL from env or port-forward."""

@pytest.fixture
def kubeconfig():
    """KUBECONFIG path."""

@pytest.fixture
def rossoctl_config():
    """Platform config from ROSSOCTL_CONFIG_FILE."""

After Writing

  1. Run test:review to verify quality
  2. Run test:run-kind or test:run-hypershift to execute
  3. Use git:commit to commit

Related Skills

  • test:review - Review test quality before committing
  • test:run-kind - Run on Kind cluster
  • test:run-hypershift - Run on HyperShift cluster
  • tdd:ci - Full TDD workflow

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

auth

無料

Authentication and authorization patterns for Rossoctl services

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Create confidential OAuth2 clients in Keycloak for server-to-service authentication

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Configure MLflow with mlflow-oidc-auth plugin for Keycloak OIDC authentication

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

ci

無料

CI pipeline monitoring, status checks, and PR validation workflows

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

Monitor running CI jobs, wait for completion, create tasks for results

日本語の概要は準備中です。原文の説明を表示しています。

rossoctl/rossoctl3032026年10月25日 更新

rossoctl のスキルをすべて見る

このスキルの問題を報告する