When opening the HDR test page, the page flow is suspended and video cannot be played properly.
From the log, MediaSource.isTypeSupported detection is not performed and flow cannot enter the video download procedure and the subsequent actions are suspended; but this is normal in some network environment using the same board.
Comparison analysis page request includes HTTP headers and download content and resources of the page, we didn't find anything abnormal. In addition we used debug version with some print for test, this is normal mostly, but is not normal without print. Other versions (qa/devel/gold) are not normal.
Can you provide some information for this problem?
In addition, this is normal for opening other videos of application https://www.youtube.com/tv.
Related
I have webdriver script for WEB UI testing but Response time getting from WebDriver Sampler is more than real browser by manually.
I ran the script in headless mode and still getting high response time.
I want to ask if there is any way to Open chrome in normal window without incognito mode, Because incognito mode already load fresh page along with css/images/styles, it does not use cached loaded images/css/styles.
Thanks in Advance
For the current version of the WebDriver Sampler 3.1 manipulating browser profile is not possible unless you want to patch the code of the relevant Config Element yourself.
You can consider switching from the WebDriver Sampler to the JSR223 Sampler and Groovy language where you will have the full freedom when it comes to the browser instantiation, for example you will be able to:
Start Firefox with the given profile
Specify user-data-dir for Chrome
However my expectation is that you should be starting "clean" session for each user, just add more iterations in the Thread Group, first opening of your application will be slow, but on subsequent requests the heavy content like images, scripts, styles, fonts, sounds, etc. will be returned from browser cache and will be fast.
I am currently trying to record a webpage which includes bundled.js files which are used to build the webpage.
Tool: JMeter version 3.0
The issue is that when I record the page in JMeter and replay the page response does not include all the elements and therefore I am unable to correlate the values that I need to then pass to the next call.
What I have noticed is that if I attach a view results tree to the recorder the values that I am looking for are visible. So they are being captured during the record but not visible on the response when replaying.
I am thinking that the .js files are executed during page load and therefore not being captured and all it shows is the actual
Please help
JMeter does not run client-side JS code at all. JS code is used for rendering on client side, while recording (and replay) in JMeter is done on HTTP level (communication level between client and server). It's the same level you'd see on Net tab in Developer tools of the browser. As far as recording/replay are concerned, those file will only be downloaded, and the client to server traffic they produce will be replayed. But nothing that runs purely on client side will be replayed. So if some magic/logic happens on client side (e.g. calculations, data transformation, etc within JS, which then is sent to the server), you have 2 options:
Duplicate the same logic /dynamic data using JMeter scripting functionality before sending an HTTP request. This is what most commonly people do.
Or another option is to use Selenium sampler and duplicate UI-level behavior, but that type of testing is quite limiting and only fits certain cases
I hit a URL through my browser and and check the Network tab of the browser, it showed me like:
DOMContentLoad: 4 seconds (Just to load DOM)
Load: 7 seconds(DOM + scripts + assets)
When I hit the same through J-Meter, it gave me a response time of ~seconds.
So, through, J-meter it's taking very long time to respond. Then, I enabled "Parallel downloads" and added a value to number field under the advanced option of HttpSampler. The response time reduced.But, still I am not sure what should be the value of that number.
Can anyone please help me out here in understanding on what factor we decide the value of the number field.
Modern browsers use ~6 parallel threads for downloading embedded resources so you should put 6 there. Adjust the value up or down to mimic browser(s) you would like to simulate.
Also don't forget to add HTTP Cache Manager as read browsers download embedded resources only once, on subsequent requests the resources (images, scripts and styles) are being returned from the browser's cache so you need to mimic this behaviour as well.
And finally make sure you are excluding external domains (3rd party banners, counters, maps, whatever) to focus solely on your application calls.
See Web Testing with JMeter: How To Properly Handle Embedded Resources in HTML Responses for more details.
I only want to record and playback login page of openbravo,
problem is i don't know it is successfully playing back or not using VU(Jmeter).
How to know Virtual User(VU) is performing same like a real user ?
After #Dmitri T help i got following things
Why HTML is not parsed/how can parse it ?
I want Jmeter to mimic like real application ?
This might help you
You're half-way from your goal, all you need to do is:
Switch to "Response Data" tab
Select "HTML" or "HTML (download resources)" from the drop-down in order to see the rendered response
In order to make your test even more realistic:
Make sure that all your HTTP Requests have "Retrieve All Embedded Resources" box checked and you're using "concurrent pool" with the size of 3-5 threads as this is how real browsers act. The best way to configure it for all the samplers without having to change each request is using HTTP Request Defaults
Real browsers download embedded resources, like scripts, styles and images, but they do it only once. On subsequent requests these resources are being returned from the browser cache. In order to simulate this behavior you need to add HTTP Cache Manager.
I'm new and just developing on J2EE.
I am modifying an existing application (an OpenSource project).
I need to save an image on a client sent by the server, but I do not know how.
This activity must be done in a transparent manner without affecting the existing operation of the application.
From the tests done I get this error:
java.lang.IllegalStateException: getWriter () has Already Been Called for this response.
How should carry out this task, according to your own opinion?
How do I save on the client, locally, the image?
Update:
Thanks for the answers.
My problem is that:
the image is generated on the server, but not for direct client request (there is no link to click on web page), the picture is composed using other services on the Internet.
reconstruct the image on the server.
This image must be sent to the client to be saved locally.
so I'd like it to appear a window where you assign the destination image
plus I'd like the rest of the application were not affected by this activity.
The application is yet on production.
Thank you very much for your response.
From the tests done I get this error: java.lang.IllegalStateException: getWriter () has Already Been Called for this response.
In other words, you were trying to mix the binary data of the image with the character data of the HTML output, or you were trying to do this in a JSP instead of a Servlet. This is indeed not going to work. You need to send either the image or the HTML page exclusively in response to fully separate requests.
In your JSP/HTML page just have a link to the image, like so:
click to download image
Then, in a servlet listening on an url-pattern of /imageservlet/*, you just get the image as InputStream from some datasource (e.g. from local disk file system as FileInputStream) and then write it to the OutputStream of the response the usual Java IO way.
You only need to set at least the Content-Disposition response header to attachment to make sure that the client get a Save As popup dialogue, else it will be displayed straight in the browser. Setting the Content-Type and Content-Length are also important so that the browser knows what the server is sending and can predict how long the download may take.
response.setHeader("Content-Type", getServletContext().getMimeType(file.getName()));
response.setHeader("Content-Length", String.valueOf(file.length()));
response.setHeader("Content-Disposition", "attachment;filename=\"" + file.getName() + "\"");
You can find complete basic servlet example in this article.
Note: you cannot control where the client would save the image, this would be a security hole. This way websites would be able to write malicious files on client's disk unaskingly.
Update: as per your update, there are two options:
You need to let the client itself fire two HTTP requests (I've answered this in your subsequent question)
Create a client side application which does all the task directly at the client side and then embed this in your webpage, for example a Java Applet. With an applet you have full control over the client environment. You can execute almost all Java code you'd like to execute and you can write files to disk directly without asking client for the location to save. You only need to sign the applet by a 3rd party company or the client needs to confirm a security warning before running.
Its up to the browser how all types of output are handled. Web pages are given a content type of html which the browser understands and ends up rendering ass a page that we can see. Images are given content type of image/jpeg etc which are rendered as images when in a page etc. To force a download prompt one needs to use a content type of a binary file rather than that of an image so the browser forces the download rather than shows the image. To ensure this use something like "application/octetstream"... i cant recall exactly but its easy to google for.