What could be the possible reason behind huge difference between response time of a page in chrome and same in chromium? - chromium

I have me testing a application using Loadrunner TruClient using browser Chromium, which gives me response time of a page as 50 seconds on an average.
But when i see the timings for the same page in Chrome, it is not more than 10 seconds on an average.
I have tried checking developer tool for both, but couldn't figure the difference.
Can anyone help me figure out the possible cause behind this?
Thanks

Could you please tell me the detail about where did you get the response time of a page as 50 seconds? Is is it from the browser devtool or TruClient transaction time? As #Alex said, TruClient is using end event to statistic the reponse time. TruClient have injected its own logic to static the network traffic information. It is not as same as native Chrome devtool. It will exclude the unnecessary waiting time in the final report.
Best regards,
Edwin

TruClient step uses End Event to determine when the step ends. End event impacts how long a step takes. Understanding end events describes all end events. View or edit the step structure describes how to manually set step end event. Try different step end events, see if it works for you.

Related

Vaadin 8 + Selenium = Slow combination, why?

I've been using Vaadin 8 for years, but a few months ago it was decided to use "Selenium" instead of Vaadin "Testbench". I will list some problems I have, maybe someone has a solution. I found a good explanatory page https://alexsiminiuc.medium.com/your-selenium-tests-are-not-slow-because-of-the-selenium-framework-63f871e2d38f but maybe someone has other information about this issue.
Expenditure:
Loading the first page, for example login page, takes more than 15 seconds to load in the browser and "noHeadlessMode". I think it's because of the Sass compiler that generates new data every time the user calls.
Sometimes "Selenium" waits even though no waiting time is defined. The wait time for WebDriver to avoid "NotFoundException" is set to 60 seconds and pause is not set.
Maybe because "selenium" loads some code and does some checks that take some time?
Sometimes it just fails and can't find item even though it runs normally and there is item.
Maybe a bug or an internal delay in "Selenium"?
Thanks for the help!

End to end response time including rendering time performance test in jmeter

Is End to end response time is the combination of client side rendering time and server response time together.
I have executed load test in Jmeter and during steady state of test I have executed selenium test to get page rendering time
But my requirement is to get end to end response time. Do we need to add server response time and page rendering time to get end to end response time?
Is End to end response time is the combination of client side rendering time and server response time together.
No, It is only the server response time.
I have executed load test in Jmeter and during steady state of test I have executed selenium test to get page rendering time
But the page rendering time also includes server response time. Hence you will end up adding server response time twice.
But my requirement is to get end to end response time. Do we need to add server response time and page rendering time to get end to end response time?
By above arguments you should not add up server response time and page rendering time.
Solution :-
In my project we are using Webdriver Sampler plugin inside jmeter. It helps us to execute selenium scripts inside jmeter.
We have 2 Thread groups which runs parallel. First for Apis and second for running selenium scripts.
While the first Thread group generates load on server by hitting Apis. The second one navigates through Ui at the same time and captures load times.
With this approach you also get "near to realistic" data as this very much simulates production environment.
Hope this gives you some pointers in right direction.
The time which Selenium gives you is end-to-end, you can get the breakdown of your page loading events by calling Navigation Timing API via WebDriver.executeScript() function
Just make sure that your JMeter test generates real-browser-like network pattern especially when it comes to handling embedded resources and AJAX requests

DOM Element Load Time Benchmarking

I'd like to benchmark my web application. Specifically I'd like to measure the load time of a particular DOM element.
I can use webdriver's wait for visible to measure how long a an element took to load and save the result somewhere. However I'd also like to measure concurrency and other factors.
Is there a standard way to do this?
While I love WebdriverIO, I would recommend using a tool other than it for benchmarking. WebdriverIO uses HTTP requests to send commands to Selenium, and because of that isn't the most performant thing. Your stats could be way off simply because the request from WebdriverIO to Selenium takes longer than usual.
I'd suggest using a tool a little "closer to the metal", possibly CasperJS

a wait that stops the test till nothing is happening in the web page anymore

I am using Java and Selenium to write a test. Many times in my test i have to wait till the page or some part of it loads something. I want to wait till the load is finished. I found these two:
1) pageLoadTimeout
2) setScriptTimeout
But I don't know the exact difference between them or even if they are what I need.
The document says:
setScriptTimeout: Sets the amount of time to wait for an asynchronous script to finish execution before throwing an error. If the timeout is negative, then the script will be allowed to run indefinitely.
and
pageLoadTimeout: Sets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite.
but I don't really get it.
what I need is a wait that stops the test till nothing is happening in the web page anymore.
Define "nothing is happening in the web page." Now define it in such a way that will satisfy every web page ever created, or that ever will be created. Did your definition include that no more network traffic is coming over the wire? Did your definition include that the onload event has fired? How about document.readyState returning a value meaning "complete?" Did you take JavaScript execution into account? How about JavaScript scheduled using window.setTimeout()? WebSockets? Service Workers? What about <frame> or <iframe> elements?
Now you know why WebDriver doesn't have a "wait for page complete" type of wait. The items mentioned above don't even begin to scratch the surface of the list of things a user could legitimately use in a definition of "nothing is happening on the page anymore." The correct approach would be to wait for the element you want to interact with on the next page to be available in the DOM. The WebDriverWait class is ideally suited for exactly this.

How to continue test when the page still not completely loaded in selenium

Actually, I am creating automation testing for an e-commerce website. Actually, the website have function lazy load or something. I am testing it on UAT server. So, it will load the page slowly because the specification of the server. It takes more than 60 sec or more to load all the resources from the webpage. So, when I am trying to create selenium automation, it always waiting more than 60 sec to continue the next step (because waiting the page fully loaded). Please, someone give me tips how to continue run the test step after 10 seconds wait the page to load. It won't throw an exception, just continue the test step.
Not possible.
If you find some element and try execute some action while loading you will get stale element error + due loading issue you will have a lot of failed tests and it will take a lot more time to debug.
Automation means to execute fast and have reliable results.
It seems that this environment is not built for automation, you should request more resources.
As an alternative maybe you can use a headless driver or see if you can put the same build on a VM.
Why this is an issue: Selenium needs to wait for each request to be complete.For example when you request a page, if the page is not received entirely and the server still sending info then the request is not done, it is logical that you need a complete request in order to continue.
You should address this to your Project Manager/QA Lead and ask for advice/option on how to handle this.
Please note that these costs should be included/added in the automation price.You need to address this in a simple way:
good server -> automation runs smoothly and fast and the testing is
done faster
bad server -> unable to run automation since is not reliable and each
test has a high rate of failure => alternative X day(s) of
manual testing for each build
If this would be a coding issue like some delayed ajax request then you would have some solutions, devs could help, but if is an infrastructure/resources issue then if not depending on you, and you cannot solve it.
You could use try any type of wait implicit/explicit, explicit would throw some exception, but this is not a solution for poor resources.