30-tests-and-output

30-tests-and-output is a cursor rule for Cursor from marianfoo/abap-mcp-server. It costs 510 tokens per session, scanned A, a copy of 30-tests-and-output, Apache-2.0.

A set of project rules for changing output formatting or keeping tests stable. It describes the test runner, HTTP helpers, result parsing, smoke tests, and checks for search and retrieval output.

In plain words
What is it for?
Use it when modifying search result formatting, updating tests, checking document retrieval, validating scores and source labels, or running end-to-end tests.
Why use it?
It reduces the risk that formatting changes break automated checks or make search results inconsistent with the expected structure.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when modifying search result formatting, updating tests, checking document retrieval…

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/marianfoo/abap-mcp-server/30-tests-and-output
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/marianfoo/abap-mcp-server

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for 30-tests-and-output

README.md
[![agentmods](https://agentmods.dev/badge/rules/marianfoo/abap-mcp-server/30-tests-and-output.svg)](https://agentmods.dev/rules/marianfoo/abap-mcp-server/30-tests-and-output)
Your own site
<a href="https://agentmods.dev/rules/marianfoo/abap-mcp-server/30-tests-and-output"><img src="https://agentmods.dev/badge/rules/marianfoo/abap-mcp-server/30-tests-and-output.svg" alt="Measured on agentmods" height="20"></a>
Per session 510 This file is loaded in full into every session.
When invoked 510 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00510 $0.00510
Opus 5 $0.00255 $0.00255
Sonnet 5 $0.00102 $0.00102
Haiku 4.5 $0.00051 $0.00051

Measured 7d ago against content hash 95a8ed8e4a06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

30-tests-and-output scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to 30-tests-and-output — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.cursor/rules/30-tests-and-output.mdc · 56 lines

What it actually says

Tests & Expected Output (Rule)

When changing output formatting or test stability.

Test Architecture

  • Test Runner: test/tools/run-tests.js - Unified test execution
  • HTTP Client: test/_utils/httpClient.js - Server interaction utilities
  • Result Parser: test/_utils/parseResults.js - Output format validation
  • Smoke Tests: test/tools/search.smoke.js - Quick functionality validation

Expected Output Format (BM25-Only)

⭐️ **<document-id>** (Score: <final-score>)
   <description-preview>
   Use in sap_docs_get

Test Categories

  • Search Tests: Verify query results and context detection
  • Retrieval Tests: Document fetching and formatting
  • Integration Tests: End-to-end MCP tool functionality
  • Performance Tests: Response time and resource usage

Test Data Structure

{
  name: 'Test Name',
  tool: 'sap_docs_search',
  query: 'search term',
  expectIncludes: ['/expected/document/id'],
  validate: (results) => { /* custom validation */ }
}

Output Validation

  • Score Format: Numeric scores with 2 decimal places
  • Context Indicators: Emoji-based context detection (🎨🏗️🧪)
  • Source Attribution: Clear library identification
  • Result Limits: Configurable via CONFIG.RETURN_K (default: 25)

Test Execution

  • Fast Tests: npm run test:fast - Skip build, use existing artifacts
  • Full Tests: npm run test - Build + test complete pipeline
  • Smoke Tests: npm run test:smoke - Quick validation only
  • Community Tests: npm run test:community - SAP Community search functionality
  • MCP Inspector: npm run inspect - Debug MCP protocol interactions

@file test/tools/run-tests.js @file test/_utils/parseResults.js @file test/_utils/httpClient.js @file test/tools/search.smoke.js @file test/tools/sap_docs_search/search-cap-docs.js @file test/tools/sap_docs_search/search-cloud-sdk-js.js @file test/tools/sap_docs_search/search-sapui5-docs.js @file docs/TESTS.md @file docs/DEV.md

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 56 lines · 510 tokens per session scan A 95a8ed8e4a06

Subscribe to this mod's changes

30-tests-and-output is a cursor rule published in the GitHub repository marianfoo/abap-mcp-server (88 stars, last pushed yesterday), licensed Apache-2.0. It adds 510 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to 30-tests-and-output, differing in 0 lines, and is treated as a copy.