Receber por email
← Voltar para o catálogo

issue-report-generator

Automatically generate clear, actionable issue reports from failing tests and repository analysis. Analyze test failures to understand expected vs. actual behavior, identify affected code components, and produce well-structured Markdown reports suitable for GitHub Issues or similar trackers. Use when a test fails, when debugging issues, or when the user asks to create an issue report, generate a b

105estrelas
Atualizado há 8 meses

Ver no GitHub ↗ Licença: Apache-2.0

Como adicionar

/plugin marketplace add ArabelaTso/Skills-4-SE

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/issue-report-generator/svg)](https://www.skillteca.com.br/skills/issue-report-generator)

Skills relacionadas

Ver todas de Desenvolvimento →

Alerta por categoria

Receba novas skills de Desenvolvimento toda segunda

1 email curto, só com as skills novas de Desenvolvimento. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

Issue Report Generator

Overview

Generate comprehensive, developer-friendly issue reports from failing tests. Analyze test failures, identify affected code, infer root causes when possible, and produce structured Markdown reports ready for issue tracking systems.

Report Generation Workflow

Step 1: Analyze the Failing Test

Understand what the test is checking and why it fails:

  1. Identify the test:
  2. Test file path
  3. Test class/function name
  4. Test method name
  1. Understand test intent:
  2. What functionality is being tested?
  3. What is the expected behavior?
  4. What assertions are being made?
  1. Analyze the failure:
  2. Exception type (if any)
  3. Assertion failure details
  4. Expected vs. actual values
  5. Error messages
  6. Stack trace
  1. Extract key information:
  2. Failure type (exception, assertion, timeout, etc.)
  3. Failure location (file, line number)
  4. Failure context (method calls, parameters)

Step 2: Identify Affected Code Components

Locate the code related to the failure:

  1. From stack trace:
  2. Extract file paths
  3. Extract class/method names
  4. Extract line numbers
  5. Identify the failure point
  1. From test code:
  2. Find the method/class being tested
  3. Identify dependencies
  4. Locate related components
  1. Code analysis:
  2. Read the failing code section
  3. Understand the logic
  4. Identify potential issues
  1. Record locations:
  2. Primary affected file(s)
  3. Specific methods/functions
  4. Line numbers or ranges

Step 3: Infer Root Cause

Determine why the failure occurs (when possible):

  1. For exceptions:
  2. Which variable/object caused it?
  3. Why is it null/invalid?
  4. Where should it be initialized?
  5. What condition triggers the exception?
  1. For assertion failures:
  2. Why does actual differ from expected?
  3. What code produces the wrong value?
  4. What condition causes the mismatch?
  5. Is there a logic error?
  1. For timeouts:
  2. What operation is slow?
  3. Is there an infinite loop?
  4. Is there inefficient algorithm?
  5. Are there blocking operations?
  1. For integration failures:
  2. What external system failed?
  3. What's the error from that system?
  4. Is it configuration?
  5. Is it connection?
  1. State uncertainty:
  2. If root cause is unclear, say so
  3. Use "suspected," "likely," "appears to be"
  4. Suggest areas for investigation

Step 4: Generate Report Structure

Create the issue report with required sections:

  1. Title:
  2. Format: [Exception/Issue] in [Component].[Method]
  3. Or: [Feature] returns incorrect [result]
  4. Keep it concise (50-80 characters)
  5. Make it descriptive
  1. Description:
  2. Brief summary of the issue
  3. Context about when it occurs
  4. Impact on functionality
  1. Steps to Reproduce:
  2. Test command to run
  3. Or code snippet to execute
  4. Minimal reproduction steps
  1. Expected Behavior:
  2. What should happen
  3. Based on test assertions
  4. Based on documentation
  1. Actual Behavior:
  2. What actually happens
  3. Include error messages
  4. Include stack traces
  5. Include assertion failures
  1. Affected Code:
  2. File paths
  3. Class/method names
  4. Line numbers
  5. Code snippets if helpful
  1. Analysis (optional):
  2. Suspected root cause
  3. Why it happens
  4. Suggested fix (if clear)
  1. Additional Context:
  2. Test details
  3. Environment info
  4. Related issues
  5. Labels/severity

Step 5: Format and Finalize

Produce the final Markdown report:

  1. Use proper Markdown:
  2. Headers for sections
  3. Code blocks for code/errors
  4. Lists for steps
  5. Bold for emphasis
  1. Be precise:
  2. Use exact error messages
  3. Include full stack traces
  4. Reference specific locations
  5. Use technical terminology
  1. Be clear:
  2. Developer-friendly language
  3. Avoid vague descriptions
  4. State facts, not opinions
  5. Indicate uncertainty
  1. Be actionable:
  2. Provide reproduction steps
  3. Identify affected code
  4. Suggest investigation areas
  5. Make it easy to fix

Report Templates

For detailed templates and patterns, see [report_patterns.md](references/report_patterns.md).

Quick Template Selection

| Failure Type | Template | Key Focus | |--------------|----------|-----------| | Exception | Exception-Based Bug | Exception type, location, null/invalid variable | | Assertion failure | Assertion Failure Bug | Expected vs. actual, wrong value source | | Timeout | Performance/Timeout Bug | Slow operation, bottleneck | | Integration error | Integration Failure Bug | External system, error message, config | | Regression | Regression Bug | Breaking commit, what changed |

Examples

Example 1: NullPointerException

Input:

  • Test: UserServiceTest.testAuthenticateNonExistentUser
  • Error: NullPointerException at UserService.java:45
  • Stack trace provided

Generated Report:

# NullPointerException in UserService.authenticate() when user not found

## Description
A `NullPointerException` is thrown in `UserService.authenticate()` when attempting to authenticate a user that doesn't exist in the database. This causes the authentication endpoint to return a 500 error instead of properly handling the missing user case.

## Steps to Reproduce
1. Run test: `mvn test -Dtest=UserServiceTest#testAuthenticateNonExistentUser`
2. Or call: `userService.authenticate("nonexistent@example.com", "password")`

## Expected Behavior
The method should return an authentication failure result (e.g., `AuthResult.FAILED`) or throw a specific `UserNotFoundException`, not a `NullPointerException`.

## Actual Behavior

java.lang.NullPointerException at com.example.UserService.authenticate(UserService.java:45) at com.example.AuthController.login(AuthController.java:23) at com.example.UserServiceTest.testAuthenticateNonExistentUser(UserServiceTest.java:67)


## Affected Code
- **File:** `src/main/java/com/example/UserService.java`
- **Method:** `UserService.authenticate`
- **Line:** 45

**Code at line 45:**

String hashedPassword = user.getPassword(); // user is null here


## Analysis
The exception occurs because the `user` object is null when the user lookup fails (line 42). The code attempts to call `user.getPassword()` without checking if the user exists.

**Suspected cause:** Missing null check after user lookup.

## Test Details
- Test file: `src/test/java/com/example/UserServiceTest.java`
- Test method: `testAuthenticateNonExistentUser`

Example 2: Assertion Failure

Input:

  • Test: CalculatorTest.testDivision
  • Error: AssertionError: expected 2.5 but got 2.0

Generated Report:

# Calculator.divide() returns integer instead of decimal result

## Description
The `Calculator.divide()` method returns `2.0` instead of the expected `2.5` when dividing 5 by 2. This indicates the method is performing integer division instead of floating-point division.

## Steps to Reproduce
1. Run test: `pytest tests/test_calculator.py::CalculatorTest::test_division`
2. Or execute:

calc = Calculator() result = calc.divide(5, 2)

Returns 2.0, expected 2.5


## Expected Behavior

assert calc.divide(5, 2) == 2.5


## Actual Behavior

AssertionError: assert 2.0 == 2.5 Expected: 2.5 Actual: 2.0


## Affected Code
- **File:** `src/calculator.py`
- **Method:** `Calculator.divide`
- **Lines:** 15-16

**Current implementation:**

def divide(self, a, b): return a / b # Using integer division


## Analysis
The method performs integer division when both operands are integers. In Python 2 or when using `//` operator, this truncates the decimal part.

**Suspected cause:** Missing float conversion or using wrong division operator.

**Suggested fix:**

def divide(self, a, b): return float(a) / float(b)


## Test Details
- Test file: `tes
Compartilhar X LinkedIn