New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response Body is not formatted correctly (View Results Tree) v5.4.1 #5507
Comments
Brian Tully (migrated from Bugzilla): |
@FSchumacher (migrated from Bugzilla): |
Brian Tully (migrated from Bugzilla):
Hi Felix! :) Yes, I've reverted back to 5.2.1 which doesn't have the problem. In terms of the view, please check out the attached screenshots which show both "Text" and "HTML Source Formatted" views in View Results Tree. Note that neither view shows line numbers nor monospace font code formatting, whereas in JMeter 5.2.1 both views do show line numbers and code formatting. Thanks! |
@FSchumacher (migrated from Bugzilla): I build 5.2.1 from source and on linux there is no line numbering or monospaced font on the response body. The response header panel has those features, though. Can you post an image of the old version showing the response body panel? |
Brian Tully (migrated from Bugzilla): |
Brian Tully (migrated from Bugzilla): |
Brian Tully (migrated from Bugzilla): That's odd. On Mac I am definitely seeing line numbers and monospace formatting for both Text and HTML Source Formatted selections under the Response Body tabs of View Results Tree. I've attached 2 new screenshots from v5.2.1. There's also this bug that I filed for 5.2.1 which shows the same perspective, though I'm pointing out that the text displayed in "Darcula" theme is dark text on a dark background: #5257 Thanks! |
@FSchumacher (migrated from Bugzilla): Do you have any third party libraries installed? Did you use the downloaded version from our home page, or did you install the version via brew or something like that? |
Brian Tully (migrated from Bugzilla): Since I'm on a Mac I did install JMeter 5.2.1 via Homebrew. Is there a specific JAR file you need me to inspect? |
@FSchumacher (migrated from Bugzilla): My lib folder has the following jars: |
Brian Tully (migrated from Bugzilla): Indeed in my Homebrew install of 5.2.1, I DO see jsyntaxpane-1.0.0.jar, whereas it is missing in my Homebrew install of 5.4.1. To test, I temporarily moved jsyntaxpane-1.0.0.jar out of my lib folder and opened a JMeter test. Now when I look at the same Response Body results for Text and HTML Source Formatted I no longer see line numbers or a monospace font. Note that I also am not getting any kind of missing class error with jsyntaxpane-1.0.0.jar no longer in lib. So to your point about how jsyntaxpane got installed, I have no idea. I guess the question I have is why wouldn't we want jsyntaxpane to be installed since it gives better response body display, or even more importantly why does "Text" and "HTML Source Formatted" give the same display of unstyled text. Even better, wouldn't it be ideal to use the same formatter as the Response Headers panel (which seems to have code syntax highlighting and line numbers) for the HTML Source Formatted selection in the Response Body panel? |
Brian Tully (migrated from Bugzilla): |
@FSchumacher (migrated from Bugzilla): The jsyntaxpane has led to at least one bug report in the past (see the linked bug report above), which is, why I don't favour adding thoughtlessly. And it seems, that it has problems with the dark mode which would have to be fixed, too. We can't use (easily) the JSyntaxTextArea for the document part, as that is using a different object type, which is not supported by JSyntaxTextArea. The difference between the formatted and non-formatted view might be hard to see. The formatted view will try to format the HTML source code by adding spaces here and there. If your source code was formatted nicely before, there will (hopefully) be no difference. If someone finds a nice way to add a more stylish display for the document view, rest assured that patches are always welcome :) |
Brian Tully (migrated from Bugzilla): I'm hoping you might point me in the right direction on how can I contribute to JMeter, especially in relation to the display/formatting of the various fields for the View Results Tree. I notice that even with the latest version of JMeter (5.5) if you select a dark theme (Darkula, One Dark, Solarized Dark, etc) it means that the text within the sample result of View Results Tree will be unreadable, because the text is displayed as black text on a dark background (e.g., Response Headers, Request Headers, Response, etc.) I've been using JMeter for many years, and while I am a developer (Python, PHP, Ruby, Javascript), Java is not one of my primary languages. However I would like to give it a try since it seems JMeter's GUI needs a lot of love. The dark text on a dark background bug has been around since JMeter 5.3 and maybe it's because most people don't use one of JMeter's dark themes, but they need a lot of help! Is there a different forum to get involved with JMeter's GUI or is Bugzilla the main entrance. Do you or anyone else know of which components are used for displaying/formatting the fields within View Result Tree? I'm guessing there are specific java classes that View Results Tree uses for formatting. Is my best bet to search through the code at https://github.com/apache/jmeter ? Many thanks in advance. |
Brian Tully (migrated from Bugzilla): |
Brian Tully (migrated from Bugzilla): |
Brian Tully (Bug 65187):
As of JMeter 5.4.1 on a Mac, when viewing the response body for a request in the View Results Tree, there is no longer a code-formatted monospace "view source" display when "Text" or "HTML Source Formatted" are selected as the filter. In previous versions of JMeter, one would see a "view source" look and feel, where line numbers were displayed and the response body was rendered in a monospace font and "preformatted" . In 5.4.1 this is no longer the case -- there are no line numbers and the response body text is not monospace or "preformatted" when either "Text" or "HTML Source Formatted" is selected.
Created attachment Jmeter-5_4_1-ViewResultsTree-unformatted-response-body2.png: Response Body unformatted - HTML Source Formatted
OS: All
The text was updated successfully, but these errors were encountered: