Bug 63316 - HTTP Request Defaults -Review All Embedded Resources parsing bug
Summary: HTTP Request Defaults -Review All Embedded Resources parsing bug
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 5.0
Hardware: PC All
: P2 major (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-04 17:09 UTC by RuThaNiel van den Naar
Modified: 2019-05-13 16:33 UTC (History)
1 user (show)



Attachments
ViewResultsTreeWithWrongPath+WholeCalendarRequest (24.44 KB, application/x-zip-compressed)
2019-04-04 17:09 UTC, RuThaNiel van den Naar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RuThaNiel van den Naar 2019-04-04 17:09:35 UTC
Created attachment 36509 [details]
ViewResultsTreeWithWrongPath+WholeCalendarRequest

Hello,
i me bug when i tried to test on our application with auto-downloading static resources.
  I recorded traffic through proxy with filter not static resources recorded, after that i added to Test Plan HTTP Request Defaults and checked Retrieve All Embedded Resources for testing with resources. 
  
   Its working fine, but i met situation, when its in want say "very naive" parser is failing and needs to be fixed, but its generating non exist missing static server problem.
  My page is call is:
  entryPoint.do 
  when downloading is resources is enabled its trying to download between others calendar.jsp its still working, but i View results Tree i see, that its as parent element and its trying to download some its resources.. I would be in general fine, but in calendar.jsp are line like this:
<td align="right"><a href="javascript:hideCalendar()"><img SRC="&quot;+imgDir+&quot;close.gif" BORDER="0" ALT="&quot;+closeCalendarTitle+&quot;"></a></td>
 So for path is using some imgDir jsp variable which is processed by site and in browser is working fine.. But Jmeter client not proccess it and instead of proper path is request resource on not evaluated string address like this:
/calendar/%22+imgDir+%22left1.gif 
  Which of course doesnt exist and its generation a error.

In jsp body is variable defined like this:
var imgDir = "/images/calendar/" // directory for images ...

 So proper path requested by Jmeter should:
/calendar/images/calendar/left1.gif

  Other problem is that such errors, are marked with same severity in results as other errors as 400 and 500, step is simply failed, i missing in Jmeter for years of usage something like errors levels or other than green and red coloring for such situation in Tree results tree (what about yellow for such use defined warnings?) and other Listerners, would be nice to have some option second column for such lesser errors in Summmary / Aggregate report to.

  Other problem is that i have use Thread group- Action to be take after a Sampler error - Continue mod for such scripts.  Which i usually dont like because it process completely bad request, when some page before is failing on hard error (404/504/assertion). Again something like checkbox do not include static resources or some error severity levels would be solution.
Comment 1 RuThaNiel van den Naar 2019-05-10 12:32:06 UTC
This bug really complicating our testing and its evaluation.

 What about simply add to HTTP sampler optimal option (checkbox) ignore HTTP Request default embedded resource downloading policy?

 In that case, we can simply add all working request for resource to particular steps.. and disable these which have broken parsing or fix urls to right ones.
Comment 2 Philippe Mouawad 2019-05-13 12:47:53 UTC
Hello,
1/ Have you tried this:

httpsampler.ignore_failed_embedded_resources=true


2/ Regarding your issue, can you confirm you have this in SRC ?

<img SRC="'imgDir'close.gif" ...

Could you provide an excerpt so that we try to fix it ?

Thanks
Comment 3 RuThaNiel van den Naar 2019-05-13 16:33:10 UTC
1) With httpsampler.ignore_failed_embedded_resources=true, it is marked as success, but its not real solution. Its good that its failing for all other samplers, i need only make some expection for some samplers where its failing because of broken parser..

2) In src.. what you mean excatly? I added some page code within my original post.