# Test Failure Report: failing test, file:line and code in 20

> Your agent reads only the failing tests: name, file:line, message and the code at that line, instead of the whole log.

Test Failure Report: failing test, file:line and code in 20 is a paid AI agent skill on Agensi by Nodirbek Abdulaxadov, in Testing & Debugging. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [Nodirbek Abdulaxadov](https://www.agensi.io/creators/nodirbek)
- Category: [Testing & Debugging](https://www.agensi.io/skills/testing-debugging)
- Version: 1.0
- Last updated: 2026-10-20
- Security: scan passed (2026-10-19); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/test-failure-report-failing-test-file-line-and-code-in-20
- Tags: testing, devops, prompt-engineering, node-js, pytest, cargo

## About this skill

When your agent runs tests, it reads everything: every passing test, progress output, ANSI color codes, framework stack frames. A 300-line log for one broken assertion. That burns context, and the agent often "fixes" the wrong line.

This skill makes the agent run tests through a small wrapper script that prints a failure-first report:

```
FAILED (exit 1): pytest -q

Failing tests (1):
1. tests/test_stats.py:6 test_even: assert 3 == 2.5

Code at the errors:
tests/test_stats.py:
   5 | def test_even():
   6 >     assert median([1, 2, 3, 4]) == 2.5
```

### What you get
- Failing tests listed first: name, file:line, the assertion message
- The code around each failure, with the exact line marked
- A shortened log that keeps the head, the tail and every error line, for setup and compile errors
- The same exit code as your test command, so your agent's pass/fail logic doesn't change
- Measured on a real node:test run: 322 lines in, 53 lines out

### Supported
jest, vitest, node:test (including TAP output, which is what agents actually see when output is piped), pytest, unittest, dotnet test (xUnit, NUnit, MSTest), cargo test. Code context also for tsc, MSBuild, Go, gcc and Java errors. Unknown output is still cleaned and shortened.

### Requirements
Node 18+. One file, zero dependencies, nothing to install. Works offline.

### Where it comes from
This is the test-output handling from [Agent Lolo](https://github.com/Nodirbek-Abdulaxadov/lolo), an open-source VS Code coding agent built for small local models (qwen2.5-coder 7B). On a 7B model, a clean failure report is the difference between fixing the bug and looping. Large models benefit the same way: fewer tokens, less guessing.

Author: Nodirbek Abdulaxadov. License: MIT.

## Requires

- Node.js 18+

## Known limitations

Requires Node 18+. Piped stdin usage loses the test command's exit code. Project root must be correctly specified for relative file resolution.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Test Failure Report: failing test, file:line and code in 20 skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill help my AI agent fix bugs more efficiently?

This skill acts as a pre-processor for your test logs, stripping away framework noise and progress bars to extract only the specific lines of code where a test failed. By reducing log volume, it prevents AI agents from getting lost in 'context noise' and helps them focus immediately on the broken logic.

### Do I need to configure specific rules for different testing frameworks like Jest or Pytest?

No manual configuration is required. The wrapper features universal parsing that automatically detects error patterns from major frameworks like Jest, Vitest, Pytest, Cargo, and .NET right out of the box.

### Will using this wrapper interfere with my existing CI/CD exit codes?

Yes, the wrapper is designed to preserve the exit code of the underlying test command. This ensures that your CI/CD pipelines or automated agent workflows still correctly identify a 'pass' or 'fail' status while benefiting from the cleaned-up logs.

### What exactly is included in the purchase and what are the system requirements?

You will receive the `test-report.mjs` script along with implementation documentation. This is a zero-dependency Node.js utility, making it extremely lightweight and easy to drop into any project running Node 18 or higher.

### Are there any specific scenarios where the tool might not capture all failure data?

While the script handles almost all standard CLI outputs, if you pipe output via stdin instead of using the `--` prefix, the original exit code of the test command may be lost. For the most reliable results, always use the prefix method described in the documentation.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
