High response times with Ajax True Client script - performance-testing

We are facing an issue with Ajax True Client script. When recording and replaying the script. One transaction took more than 60 sec time to load the page. Same behaviour observed after executing scenario in controller as well. But, if we manually perform the same transaction, it took only 8 sec. There is huge gap between the expected response times. Can any one suggest the fix?

This happens because of external resource download attempts by the script, which are not visible to you when you manually browse the page.
For example, if the page requests data from Google Analytics, or Facebook, and cannot access these sites (due to company restrictions, firewall, etc.), the response time would jump up to 60 seconds (timeout), but when you browse manually, you will not experience the timeout, since the browser behaves differently.
To resolve this issue, you should first find out which site is the script attempting to download data from? You can do this using a browser's developer tools (such as F12 tool in Google Chrome), and looking at the "Network" tab. Once you use this tab and browse to the web page, you should see the external HTTP requests. Make a list of these sites.
Once you know which external sites the page goes to, you can then use the Utils.removeAutoFilter JS command in your TruClient script:
From the Truclient Toolbox, choose "Misc" > "Evaluate Javascript Code" and add it to the first line of your script.
Then you can set the JS code in this action to:
Utils.removeAutoFilter(url, isIncluded);
for example, to prevent the script from downloading data from facebook:
Utils.removeAutoFilter('http://facebook.com', true);
Utils.removeAutoFilter('https://facebook.com', true);
Utils.removeAutoFilter('http://www.facebook.com', true);
Utils.removeAutoFilter('https://www.facebook.com', true);

Related

Started fullstackopen for the first time and getting a "favicon.ico" request in the network tab

So I basically started this web dev course by fullstackopen and in one of the steps it says that once you open the Developer Console, and refresh the tab, 2 requests shall appear (one HTTP GET request and the another for an image to be retrieved from the server, but whenever I refresh I get this unknown request called "favicon.ico" every time. For the next steps also the same is happening. While the courses explains all the other requests made, it does not even talk about this one because this does not appear in their examples. So I just wanted to know why I am getting this random request. first one is what the network tab should have displayed
second image shows what I get when I follow the instructions of the course
As Akki mentioned, this is the icon you would see on a tab in the browser. Like the StackOverflow icon for this page.
You are getting a status 200 response, so it does find it in your root
Modern browsers will show an icon to the left of the URL. This known as the favicon.ico and is typically fetched from website.com/favicon.ico. Your browser will automatically request it when browsing to different sites. If your browser receives a valid favicon.ico file, it will display this icon. If it fails, it will not display a special icon.
In either circumstances, browsing is not affected.
It would seem that you don't have a favicon in your root directory of the project thus the unknown request

How browser displays a static website contents without any confusion, when two requests are fired from a browser in different tabs

I'm a web developer, I just want to know how things work behind the scenes when a request is fired.
Suppose let's assume I've a static website, I requested about us page in one tab, contact us in other tab, both the requests are fired at the same time..
when the requests are fired at the same time, How browser displays the content in respective tabs correctly ?
Thanks in advance..
I think you are looking for process id,
In browser each tab have different process id ( you can see that is task manager )
This seperates the send and receiving of the data in each tab...

Background Page Doesn't Show as Active User

I added Google Analytics to a Chrome Extension. It is reporting events correctly as well as recording popup page views. When the extension is reloaded it correctly records a view of background.html which I explicitly call.
Problem: Despite the extension having a persistent background.html page, "Active Users" in the Real-Time section of GA shows 0. I would like to be able to see the # of concurrent users of the extension at a given time. Is there a way to do it?
Possible Solution? - When I open the popup it displays an active user for some number of minutes before dropping back down to zero. Do I need to create a heartbeat function of some kind that pings GA every X minutes to keep a user active. It seems a big "chatty" to do that.
Is there a better solution?

Getting very slow ajax responses when requesting product page

I'm building a Chrome extension for the steam community, and this extension has some functions to get the user games list and scrap their product page to get some information about every game.
Any of the requests done by the extension to the API is almost instant, but when I try to load an app page (like for example http://store.steampowered.com/app/440/ ), the response is delayed up to 40s.
At the end, the page loads and the ajax request is successful, but the waiting times are just too high.
I have noticed that this behaviour is not consistent, and on other computers with the same exact extension code and internet connection theresponse is instant, and on the same computer with other browsers the delay is not there either.
Why could this happen? I'm not starting multiple ajax calls, and the extension waits before finishing a call before making the next one.
Please, see attached image
Thanks

Record Browser Actions

I am looking for some browser recording software which can record browser actions for one of the business application and give the html elements :- name/id/xpath of the element along with the action performed (ex click, send keys, javascript etc)
My "application under test" is specific to IE and it doesn't run in any other browser.
Try using Selenium. It allows you to record browser actions and save them for later use (like automated browser testing).
You may want to try using SeleniumRC if you want to do this for Internet Explorer. You'll still have to set up some steps through firefox, but you should be able to run your tests on IE.
Try out contizee (www.contizee.com) which is a browser based plug in, easy record and playback and allows me to edit action paths e.g.
$("input#fk-top-search-box").val("HP COMPAQ");
form#fk-header-search-form>div.search-bar-wrap>div.search-bar>div.unit.search-bar-submit-wrap.size1of6>input.search-bar-submit.fk-font-13.fk-font-bold
We can customize according to our needs

Resources