Почему шаблоны URL-адресов, которые нужно исключить из HTTP-меток Jmeter, не работают?

7115
Victor

При попытке сделать запись в Записывающем скрипте тестов HTTP (ов) WorkBench я использовал предложенные исключения для шаблонов URL для исключения :

.*\.(bmp|css|js|gif|ico|jpe?g|png|swf|woff) 

Но в контроллере записи я все еще получил много cssфайлов, таких как:

56 /project/web/css/common-styles.css 

Зачем?

0

1 ответ на вопрос

0
Dmitri T

I suggest reporting this issue via JMeter Bugzilla

In regards to the whole point of excluding scripts, images, styles, etc. from the load test - I totally disagree, in my view the load test needs to be as realistic as possible and JMeter simulation should be as close to what real browser do as you can do it.

Few recommendations:

  1. Real browsers fetch scripts, styles and images from the web page and use concurrent thread pool for it which varies from browser to browser. So tell JMeter to retrieve all embedded resources from the webpages and do it concurrently. The best place to configure this behavior is HTTP Request Defaults (by the way, you can use it while recording)
  2. As per point 1 browsers download images, styles, etc. but they do it only once, on subsequent requests these assets are being returned from browser's cache. To replicate this behavior add HTTP Cache Manager to your test plan.
  3. The absolute majority of web applications use cookies. To enable cookies support it's quite enough to add HTTP Cookie Manager which provides support, access and control of cookies.
  4. It may also be required to send some request headers as in some cases output varies depending on headers presence and values like for "User-Agent", "Accept-Language", "Accept-Encoding", etc. It can be handled via HTTP Header Manager

Похожие вопросы