Skip to content
cccskills
FreePublished on GitHub

test:write

Write E2E and unit tests following Rossoctl testing standards

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303 stars(GitHub 303 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md2.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

auth

Free

Authentication and authorization patterns for Rossoctl services

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

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

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

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

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

Configure OpenTelemetry Collector with OAuth2 authentication for trace export

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

ci

Free

CI pipeline monitoring, status checks, and PR validation workflows

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

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

The English summary is being prepared. Showing the original description.

rossoctl/rossoctl303Updated Oct 25, 2026

See all skills by rossoctl

Report a problem with this skill