jmeter removes slash (/) from requested URL's - jmeter

I requested a web page using Jmeter with "Retrieve all embedded resources" enabled. When I ran the scenario, some URLs' of pictures did not open with the error "Bad Request". When I compared the working URL and URL that Jmeter checks, I realized that / is missing on the URL that Jmeter checks.
Screenshot
Screenshot2
What should I do to fix this?

It looks like a bug in JMeter.
You should submit a bug following this doc:
http://jmeter.apache.org/issues.html
Ensure you attach:
- the HTML page content that contains the links
- The jmeter.log
- A sample test plan

I tried the same with the version 2.13. No problem, which means that version 3.3 is buggy in terms of this issue.

Related

Immediate help required - Getting error 403 and 500 in jmeter

I am working with Jmeter to do load testing. I created a simple login script using BlazeMeter. Then I imported the file into Jmeter.
Whenever I try to run the script, it fails. The problem I encounter here is that 2 of my https requests I receive a 403 and 500 response code.
enter image description here
Output
I added an HTTP Authorization Manager to try and solve this but it is not working. Do you have any suggestions on how to resolve this?
I tried adding post processors but couldn't make them work.
First of all Template value in the Regular Expression Extractor should be $1$
Also your regular expression itself looks kind of weird and I doubt it matches anything. You can check whether it generates the proper ${state} variable by using Debug Sampler and View Results Tree listener combination
In general using regular expressions for parsing HTML is not the best idea, it worth considering migrating to CSS Selector Extractor

JMeter HTTP Request shows a second failed result of a wrong URL

My results tree shows a separate status for a URL connection I have absolutely no idea where it might come from:
The first result with the -0 at the end is that of the request I send willingly. The other connection with the -1 comes out of the void.
In the response body I can see that JMeter fails while trying to resolve the DNS name:
java.net.UnknownHostException: aida.xyz.removed
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(Unknown Source)
This is my definition of the HTTP Request:
As you can see this goes to a totally different host and protocol (http instead of https).
I checked the defined csv, it does not contain the hostname "aid". Same goes for the JMX file and any environment variables set.
I am using Apache JMeter 5.0
After I read Ubiks answer I checked if there are any redirects in the first request. There are no redirects but in the content there are several script and img resources.
It looks like JMeter parses the first request for resources it has to download. But I didn't enable this setting / don't even know where to activate this.
I guess it’s either a redirect issued from response to the first request or because JMeter tries to download embedded resources.
Check the response of first request.
If the reason is that JMeter downloads (probably missing) resources, make sure you disable Retrieve All Embedded Resources in the Advanced tab.
The error you're getting indicates the problem with the system under test, JMeter cannot resolve an embedded resource - image, script, style, font, iframe, whatever.
You need to raise an issue as not available content is not good i.e. for SEO purposes, moreover it might be essential for your application functionality of LAF
If this is a known issue which is in process of fixing (or considered as won't fix) you can turn JMeter's check for embedded resources presence by adding the next line to user.properties file:
httpsampler.ignore_failed_embedded_resources=true
JMeter restart will be required to pick the property up.
More information:
JMeter Properties Reference
Configuring JMeter
Apache JMeter Properties Customization Guide

"HtmlUnit" Driver with Jmeter shows errors in javascript

I'm trying to add a "WebDriver Sampler" in Jmeter with "HtmlUnit Driver Config". Have written a simple come, which opens a webpage. But in the back ground, there are tons of errors / warnings related to JS and CSS, present in the web page.
Something like this
2018-06-19 11:57:45,993 WARN c.g.h.IncorrectnessListenerImpl: Obsolete content type encountered: 'text/javascript'.
Some of the previous questions says its due to old JARs, but I have all latest.
1. Is there any way to solve this ?
2. Can we set logLevel in the webdriver sampler ?
No one will be able to provide answer to point 1 unless you provide the URL of the page you're trying to test.
Looking into the warning itself - it indicates a bug in your system under test as valid Content-Type for JavaScript should be application/javascript so you can raise a defect to get this fixed.
If you totally sure that the behavior is expected and there are no plans to fix these "tons of errors" you can add the next line to log4j2.xml file in "bin" folder of your JMeter installation under <Loggers> tag:
<Logger name="com.gargoylesoftware.htmlunit" level="fatal"/>
See How to Configure JMeter Logging article for more information on tuning JMeter logging subsystem.

Does jmeter work with webseal?

I've trying to make some jmeter test to work with webseal.
The test were working fine without it even in https but with webseal I get 302 and 404 error on some of my httprequest while other work just fine.
But according to this page : http://90kts.com/2008/10/27/performance-testing-spnego-or-kerberos-with-loadrunner/
jmeter and webseal don't work.
I'm probably reading it wrong but I can't seem to find info about the usage of those 2 product together.
Anybody have experience using jmeter and webseal or should I look for a alternative load test product ?
the problem is neither jmeter or webseal but how badboy was exporting the request in jmeter.
The implementation fo the http request need to be httpclient4 in order for the login to work but badboy was settin git to java by default.
And the path saved by badboy is plain wrong, it giving the sub path were has the initial request (which was working) was a level higher.
working: /parent_path/Apps/servlet
badboy: /Apps/servlet
however this seem to not be a problem in a environement without webseal.

Jmeter null url detected (should not happen)

My jmeter log indicates me alot of same kind of warnings which makes me clueless
WARN - jmeter.protocol.http.sampler.HTTPSamplerBase: Null URL detected (should not happen)
what should i look for? i ve googled around but cant find any info related to my issue.
Add: The Test at all is running fine.
This happens when you check download resources.
The message is issued when one of the URLs returned by the HTML Page parser is null.
This is not supposed to happen, if it does it seems to be a bug:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55092
As per your bug report, it happens because you have iframe tags which source is:
about:blank
Bug will be fixed in 2.10 version of JMeter
As a workaround you can uncheck download resources, you test will then work only on dynamic resources, not static ones (images,css,js ...)

Resources