Jmeter by default marks transaction/request as fail when embedded resources(.js, .css. .img...etc) throws 404(file not found) HTTP status code, to mark transaction/request as pass use any of the following 4 methods.
1. Un-comment "httpsampler.ignore_failed_embedded_resources=false" in Jmeter properties file and mark it as true. (This technique ignores 500 errors)
2. Exclude corresponding resource(s) while downloading embedded resources(run-time) by using following Reg-ex.
Regexp: ^((?!RESOURCE URL).)*$
Eg:
HTTP Request Defaults
3. Use Bean-shell assertion when explicitly requesting a resource
Eg:
Note: Bean-Shell assertion doesn't work when downloading resources during test execution (i.e when "Retrieve All Embedded Resources" checked on HTTP Request Defaults).
4. Ignore Status
Eg:
Note: It also ignores 5XX errors (eg: 500-Internal Server Error) which is not recommended, so use ignore status option when appropriate.
1. Un-comment "httpsampler.ignore_failed_embedded_resources=false" in Jmeter properties file and mark it as true. (This technique ignores 500 errors)
2. Exclude corresponding resource(s) while downloading embedded resources(run-time) by using following Reg-ex.
Regexp: ^((?!RESOURCE URL).)*$
Eg:
HTTP Request Defaults
3. Use Bean-shell assertion when explicitly requesting a resource
Eg:
Note: Bean-Shell assertion doesn't work when downloading resources during test execution (i.e when "Retrieve All Embedded Resources" checked on HTTP Request Defaults).
4. Ignore Status
Eg:
Note: It also ignores 5XX errors (eg: 500-Internal Server Error) which is not recommended, so use ignore status option when appropriate.
No comments:
Post a Comment