Anthony Phan
Anthony Phan

Reputation: 3

How use image/svg+xml in JMeter

please support...

How use Request URL in Jmeter (with no protocol): data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E

Thank you...

Image1: Source method GET svg

Image2: How can I remove protocol

Upvotes: 0

Views: 2798

Answers (2)

Anthony Phan
Anthony Phan

Reputation: 3

data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E use when display Submit button

svg tag validate submit button

svg tag allow display Submit button

Upvotes: 0

Dmitri T
Dmitri T

Reputation: 167992

This situation is not possible for normal load testing. It looks like you just pasted the data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E line into browser URL.

This doesn't generate any HTTP request therefore it does not test anything apart from your browser's ability to support Data URIs

Assuming all above there is nothing to do with JMeter here.


Going forward when it comes to web applications load testing you don't need to either manually create requests for images, scripts, styles, fonts, etc. or record them using JMeter's HTTP(S) Test Script Recorder as real browsers handle it differently.

  1. While recording make sure to exclude all the images (including SVG)

    enter image description here

  2. While replaying make sure your HTTP Requests samplers are configured to Download Embedded Resources and do it in parallel. This can be done using HTTP Request Defaults

    enter image description here

Check out Web Testing with JMeter: How To Properly Handle Embedded Resources in HTML Responses article for comprehensive information on simulating browser's behavior more closely when it comes to web applications performance testing.

Upvotes: 0

Related Questions