Works with the AI Agents you already use

    test writer pro

    by Mgnlocki

    1

    Generate framework-aligned, edge-case-heavy tests that match your project's specific coding style and conventions.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    test writer pro

    test writer pro

    Example session with this skill installed

    Read payment_service.py and generate pytest tests. Use the existing database fixtures from conftest.py and make sure to cover partial refunds and expired tokens.

    • Read your context and instructions
    • Compiled the test writer pro

    I have analyzed payment_service.py and your existing test suite.

    Detected

    pytest with fixtures from conftest.py, using pytest-mock for boundaries and factory_boy for data generation. Naming convention follows test_<behavior>.

    Test Suite for PaymentService

    import pytest
    from app.services.payment_service import PaymentService
    from app.exceptions import PaymentError
    
    @pytest.mark.parametrize("amount, expected_status", [
        (100.0, "success"),
        (50.5, "success"),
    ])
    def test_process_refund_full_and_partial(mocker, db_session, user_factory, amount, expected_status):
        """
        Ensures both full and partial refunds update the transaction state correctly.
        """
        # Arrange
        user = user_factory()
        service = PaymentService(db_session)
        mock_gateway = mocker.patch("app.services.payment_service.StripeGateway.refund")
        mock_gateway.return_value = {"status": "succeeded"}
    
        # Act
        result = service.process_refund(user_id=user.id, amount=amount)
    
        # Assert
        assert result.status == expected_status
        assert result.amount == amount
        mock_gateway.assert_called_once()
    
    def test_process_refund_fails_with_expired_token(mocker, db_session, user_factory):
        """
        Validates that expired tokens propagate a PaymentError rather than failing silently.
        """
        # Arrange
        user = user_factory()
        service = PaymentService(db_session)
        mocker.patch("app.services.payment_service.check_token", return_value=False)
    
        # Act & Assert
        with pytest.raises(PaymentError, match="Token expired"):
            service.process_refund(user_id=user.id, amount=10.0)
    
    def test_process_refund_idempotency(mocker, db_session, user_factory):
        """
        Verifies that duplicate refund requests for the same transaction ID do not trigger multiple API calls.
        """
        # Arrange
        user = user_factory()
        service = PaymentService(db_session)
        mock_gateway = mocker.patch("app.services.payment_service.StripeGateway.refund")
        
        # Act
        service.process_refund(user_id=user.id, amount=10.0, idempotency_key="test_key")
        service.process_refund(user_id=user.id, amount=10.0, idempotency_key="test_key")
    
        # Assert
        assert mock_gateway.call_count == 1
    

    Next steps

    1. Run the new tests: pytest tests/test_payment_service.py -v
    2. Review the PaymentError handling; the current implementation logs the error but does not alert Sentry.
    3. Verify if the idempotency key should expire after 24 hours.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Tests that look like your senior teammate wrote them, not AI boilerplate. Auto-detects framework (pytest+conftest fixtures, Jest, Vitest, Playwright, Go testing, RSpec), reads your existing tests FIRST and matches house style — naming, fixtures, assertions, mock placement. Mandatory edge-case matrix (empty/null/boundary/error), mocks only at true boundaries, strictly deterministic (no network, no sleeps, no flake). Coverage-gap analysis ranks untested functions by risk (money/auth first). Every suite ships with the exact run command — and it runs them.

    Requires existing tests or setup files to match style. Cannot execute tests without a local runtime. Skips testing private methods to follow design best practices.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Frequently Asked Questions

    Unlike generic AI generators, this skill performs a deep analysis of your existing test files to match your specific naming conventions, mock patterns, and directory structures. It ensures new tests look identical to your team's established codebase rather than looking like AI-generated boilerplate.

    The skill supports a wide range of popular frameworks including Pytest (with Conftest), Jest, Vitest, Playwright, Go testing, and RSpec. It automatically detects your environment, so you don't need to manually configure the framework before running it.

    Every generated suite includes the exact CLI command required to execute the tests. The skill is designed to produce strictly deterministic code, meaning it avoids network calls and 'sleep' commands to ensure your CI/CD pipeline remains flake-free.

    The skill performs a coverage-gap analysis that prioritizes high-risk areas like authentication and financial logic. In addition to standard happy-path tests, it generates a mandatory edge-case matrix covering null values, boundary conditions, and error handling for every function.

    You receive the full Test Writer Pro skill set, which includes the auto-detection engine, the house-style matching logic, and the risk-based coverage analysis tool. Updates are delivered through the marketplace to ensure compatibility as underlying AI models and testing frameworks evolve.

    New in Testing & Debugging

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.