Skip to content
Back to skills

Testing

ASecurity

Lingua's testing tools for transformation coverage and end-to-end SDK validation.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
testingtypescriptrustgobashtestingapi

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-testing-awesome-omni-skill/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-testing-awesome-omni-skill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: testing
description: Lingua's testing tools for transformation coverage and end-to-end SDK validation.
---

# Lingua Testing

Two complementary testing approaches for validating cross-provider transformations.

## Overview

| Tool | Purpose | Uses API? | When to Use |
|------|---------|-----------|-------------|
| `coverage-report` | Field-level roundtrip coverage | No | Finding missing/changed fields |
| `lingua-capture` + `test:transforms` | Real SDK validation | Capture only | Validating against real APIs |

## Coverage Report (Rust)

Tests transformations roundtrip without calling APIs. Detects lost, added, or changed fields.

### Quick Iteration (Compact Mode)

```bash
# After code changes - fast validation
cargo run --bin coverage-report -- -f compact

# Filter to specific providers
cargo run --bin coverage-report -- -f compact -p anthropic,responses

# Filter to specific test case
cargo run --bin coverage-report -- -f compact -t "reasoning*"
```

### Full Investigation (Markdown Mode)

```bash
# Initial investigation with full error details
cargo run --bin coverage-report

# Save to bug file for planning
cargo run --bin coverage-report -- -p anthropic > .claude/anthropic_bugs.md
```

### Reading Compact Output

```
Stats: 669/1704 (39.3%) [512+157lim] 1035fail

[P1] L:usage.prompt_cache_tokens (123)
  ant→ggl: cacheParam (response)...(+44)
```

- `L:` = Lost fields, `A:` = Added, `C:` = Changed
- `(123)` = affected test cases
- Abbreviations: `oai`=ChatCompletions, `ant`=Anthropic, `rsp`=Responses, `ggl`=Google, `bed`=Bedrock

## SDK Transforms Testing (TypeScript)

Validates against real provider SDKs with schema validation at every step.

### Transformation Pairs

- `chat-completions ↔ anthropic`
- `responses ↔ anthropic`

### Capture Responses

Calls real SDKs (requires API keys):

```bash
cd payloads

pnpm lingua-capture              # Capture missing only
pnpm lingua-capture --force      # Recapture all
pnpm lingua-capture toolCall     # Filter by name
```

Output: `transforms/{source}_to_{target}/{caseName}.json`

### Run Tests

Uses captured responses (no API calls):

```bash
cd payloads

pnpm test:transforms             # Run all
pnpm test:transforms:update      # Update snapshots
pnpm test:transforms:watch       # Watch mode
```

### What It Validates

1. **Request transform** → validates output against target schema
2. **Load captured response** → validates against target response schema
3. **Response transform back** → validates against source schema
4. **Snapshots** → detects unintended output changes

### Known Incompatibilities

Some transformations are impossible. Document in `transform_errors.json`:

```json
{
  "responses_to_anthropic": {
    "reasoningRequestTruncated": "max_tokens (100) < budget_tokens (1024 min)"
  }
}
```

These tests pass silently.

## Workflow

### Adding a New Test Case

1. Add case to `payloads/cases/`:
   ```typescript
   newFeature: {
     "chat-completions": { model: "...", messages: [...] },
     anthropic: { model: "...", max_tokens: 1024, messages: [...] },
   }
   ```

2. Check coverage:
   ```bash
   cargo run --bin coverage-report -- -f compact -t newFeature
   ```

3. Capture SDK responses:
   ```bash
   cd payloads && pnpm lingua-capture newFeature
   ```

4. Run transform tests:
   ```bash
   pnpm test:transforms
   ```

### Fixing a Transformation Bug

1. Investigate with full coverage report:
   ```bash
   cargo run --bin coverage-report -- -p anthropic,responses > .claude/fix_bugs.md
   ```

2. Iterate with compact mode:
   ```bash
   cargo run --bin coverage-report -- -f compact -p anthropic,responses
   ```

3. Verify SDK compatibility:
   ```bash
   cd payloads && pnpm test:transforms
   ```

4. If snapshots changed intentionally:
   ```bash
   pnpm test:transforms:update
   ```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.