Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

InfluxDB Backend Listener: Limited error information and missing assertion failure details

Aperta
#6,491 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
50/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

Inizia da src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java, concentrandoti su SamplerMetric.add() e sulla sua gestione attuale degli errori. Riproduci il fallimento con una Response Assertion configurata per fallire intenzionalmente e con InfluxDB Backend Listener, quindi verifica che i nomi delle assertion, i messaggi di errore e gli errori HTTP siano rappresentati separatamente nelle metriche riportate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

defect to-triage
Expected behavior

When using the InfluxDB Backend Listener, error metrics should capture complete error information including:

  1. Detailed Assertion Failures: Each failed assertion should be reported with:
    • Assertion name (e.g., "Response Assertion", "Duration Assertion")
    • Specific failure message (e.g., "Expected to contain 'success' but found 'error'")
    • Individual error count for each assertion type
  2. HTTP Response Failures: Non-assertion failures should report:
    • HTTP response codes (e.g., "404", "500")
    • Response messages (e.g., "Not Found", "Internal Server Error")
  3. Comprehensive Error Categorization: Errors should be properly categorized and distinguishable in InfluxDB/Grafana dashboards
Actual behavior

The InfluxDB Backend Listener currently provides limited error information:

  1. Missing Assertion Details: Assertion failures are completely ignored in error metrics
    • No individual assertion failure reporting
    • No distinction between different types of assertion failures
    • Loss of valuable debugging information
  2. Incomplete Error Information: Only HTTP response code/message errors are captured
    • Assertion failures are not reflected in error metrics
    • No visibility into specific assertion failure reasons
    • Difficult to debug test failures without detailed error context
  3. Poor Error Debugging: Users cannot identify:
    • Which specific assertions are failing
    • Why assertions are failing (missing expected text, duration exceeded, etc.)
    • Patterns in assertion failures across different test scenarios

I have the potential solution to resolve this issue: The issue is in the SamplerMetric.add() method in src/components/src/main/java/org/apache/jmeter/visualizers/backend/SamplerMetric.java. The current implementation only creates ErrorMetric objects based on HTTP response codes, ignoring assertion failures entirely.

Required Changes:

  • Enhance Error Processing: Modify the error handling logic to process both HTTP response failures and assertion failures
  • Add Assertion Failure Support: Create ErrorMetric objects for each failed assertion with assertion name and failure message
  • Improve Error Categorization: Distinguish between HTTP response errors and assertion errors in the metrics
Steps to reproduce the problem
  1. Create JMeter Test Plan:
    • Add Thread Group
    • Add HTTP Request sampler (configure valid URL)
    • Add Response Assertion (configure to fail - e.g., check for text that doesn't exist)
    • Add InfluxDB Backend Listener
  2. Configure Response Assertion:
    • Set "Apply to" to "Main sample only"
    • Add "Contains" pattern with text that won't be found in response Or add Duration Assertion with very low threshold (e.g., 1ms)
  3. Configure InfluxDB Backend Listener:
    • Set InfluxDB URL
    • Set database name
    • Enable "summaryOnly" = false
    • Set appropriate measurement name
  4. Run Test and observe in InfluxDB/Grafana:
    • Expected: Error metrics showing all assertion name (in responseCode) and failure message (in responseMessage) per sample/ transaction
    • Actual: No error metrics for assertion failures, only constant Error responseCode (Assertion Failed) and single assertion failed message per sample/ transaction are captured
  5. Verify Missing Information:
    • Check InfluxDB for error metrics with assertion names
    • Verify that assertion failure messages are not present
    • Confirm that only HTTP response codes appear in error metrics
JMeter Version

5.6.3

Java Version

No response

OS Version

No response

Lingua principale
Java
Stelle
9.6k
Fork
2.3k
Merge medio
18h 33m
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/jmeter

Tutte le issue di apache/jmeter

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.