Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

XPath and XPath2 extractors insert a new line in the failure message which breaks CSV log file formatting for the listener.

オープン 初心者向け
#5,770 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
testing-qa

調査の方向性

src/components/src/main/java/org/apache/jmeter/extractor/XPathExtractor.java と XPath2Extractor.java の、issue でリンクされている失敗メッセージの呼び出しから始めます。追加されたテキストが listener の CSV 出力にどのように到達するかを確認し、プロジェクトに適切なテスト場所が用意されている場合はカバレッジを追加します。完了条件は、extractor の失敗時に説明テキストが保持され、CSV 処理を妨げる改行が挿入されないことです。

索引モデルが issue の本文から書いたものです。

説明

invalid wontfix

Using an XPath or XPath2 extractor on a http sampler.
If the http sampler fails, or the response is empty, or not in the expected format, the extractor fails and appends text to its failure message
This appended text inserts a new line character before the appended text.
The new line character is logged by listener when logging the failure message, and breaks the file format when the listener is logging as CSV.

These files
ass.setFailureMessage(thrown.getLocalizedMessage()+"\nSee log file for further details.");
Line 199 XPath Extractor

ass.setFailureMessage(thrown.getLocalizedMessage()+"\nSee log file for further details.");
[Line 165 XPath2] (https://github.com/apache/jmeter/blob/c7279348335b820c35ee570462cb2e0b4eb1c370/src/components/src/main/java/org/apache/jmeter/extractor/XPath2Extractor.java)

Example CSV output :

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Filename,Latency,Encoding,SampleCount,ErrorCount,Hostname,IdleTime,Connect
2023/02/03 10:16:46.263,213,Test,502,FailureMessage,Thread Group 1-1,text,false,"Premature end of file.
See log file for further details.",0,0,1,1,null,,0,ISO-8859-1,1,1,MachineName,0,0

This should look like

timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Filename,Latency,Encoding,SampleCount,ErrorCount,Hostname,IdleTime,Connect
2023/02/03 10:16:46.263,213,Test,502,FailureMessage,Thread Group 1-1,text,false,"Premature end of file. See log file for further details.",0,0,1,1,null,,0,ISO-8859-1,1,1,SBGMLXNK094VJCR,0,0

The problem this causes is the file then cannot be processed as a valid CSV without manually correcting/removing the new lines, eg a post test JMeter report cannot be generated as it cannot read the file as a CSV format.

主要言語
Java
スター
9.6k
フォーク
2.3k
平均マージ
18時間 33分
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/jmeter のほかの issue

apache/jmeter の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。