Jmeter URL patterns to exclude under workbench - not excluding patterns that are giving there

心不动则不痛 提交于 2021-01-28 05:11:45

问题


Jmeter URL patterns to exclude under workbench - not excluding patterns that are giving there. Can we give direct URL's. i have a list of URL that needs to be excluded from the recorded script. Example: 'safebrowsing.google.com` 'safebrowsing-cache.google.com' 'self-repair.mozilla.org' i'm giving these directly under patters to exclude. or do i need to give as a regular expression only. Can someone provide more info whether to use regular expression or direct url can be provided under Requests Filtering in workbench


回答1:


JMeter uses Perl5-style regular expressions for defining URL patterns to include/exclude so you can filter out all the requests to/from google and mozilla domains by adding the following regular expression to URL Patterns to Exclude input of the HTTP(S) Test Script Recorder:

^((?<google>|mozilla>).)*$

See Excluding Domains From The Load Test article for more details.




回答2:


If you want any of the patterns to be excluded from recording in the scripts please follow the below pattern and add it in "URL Patterns to Exlcude" it must work.

1. For .html : .*\.html.*
2. For .gif :  .*\.gif.* etc 


来源:https://stackoverflow.com/questions/44034735/jmeter-url-patterns-to-exclude-under-workbench-not-excluding-patterns-that-are

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!