Measuring Response Times In Combination With WatiN - watin

I'm looking for a tool that I could potentially use in combination with WatiN that would allow me to more or less measure both the response time of an interaction and also the filesize of the same interaction in combination with WatiN. Let's say, I make a google request. That's great, we've all seen that example, but what if I want to see how long that request took and also what was downloaded and how long it took. Does anyone know any tools that can be used programmatically to do this? Sure, there are many tools such as Charles, Fiddler 2 and Firebug that allow you to do this via an interface, but I'd like to be able to automatically generate reports and the like based on this tool.

Check out HttpWatch:
"HttpWatch is an HTTP viewer and debugger that integrates with IE and Firefox to provide seamless HTTP and HTTPS monitoring without leaving the browser window."
There is an article on the website called Using HttpWatch with WatiN with sample code for using it with WatiN.

Related

Testing IE on Mac using Selenium Grid?

Is there a way to do this? I am having issues setting up the company's VM, and was wondering if there is an alternative.
If you can afford you can go for Cloud based cross browser testing services like SauceLabs or BrowserStack.Both were easy to configure and works the same way grid works.All you have to do is give the remoteurl.You can try with trial license and see if it suits your need
You can see comparitive study of these and others here
It's Feb 8, 2017 and I'm using BrowserStack to do Selemium Webdriver testing using mocha/node, W7/8.1/10, and IE11 and there are several issues with the platform and ie webdriver (2.3, per their site), e.g. input fields are not in view by default, wrong chars are sent to input fields, etc. It is also slow. I might start looking into running grid if we cannot get better use and value out of $80/month charge.

Is there a way to test Comet applications without a running browser?

I'm trying to connect to an application that uses Comet and is pretty heavy on Javascript and Comet. I've gone as far as I can go in Firebug, HTTP Header examination and am trying to see what's coming over the wire by writing something using Ruby Mechanize.
However, since I have no client run-time, my approach is to mimic the HTTP requests going back and forth (doing this using Ruby Mechanize). I'm looking at the logs and comparing them to LiveHTTPHeader output and it's very similar but the server isn't responding (I don't have access to the server side code).
Are there tools that could help? Has anyone tried simulating the DOM and Javascript runtime using something like Rhino or is that just asking for pain?
The only sane way I've found to run automated tests on web apps involving substantial Javascript (w/ or w/o Comet) is selenium rc -- basically, mechanizing/automating a real browser from your favorite programming language. (There may be other approaches with a similar architecture, but Selenium is popular and it's what I'm familiar with). Simulating browser's DOM and JS is just too painful -- been there, tried that, failed miserably;-).
Visual Studio 2010 Ultimate edition provides very good testing support for web applications. I had tried the web load test and it was impressing.

monitor traffic to and from my pc

I want to see each url request made my by browser.
I want to see the url requests made by ajax.
Which software should I use? Some java code would also help.
You can use Fiddler or if you need to "go deep" (as their web page says), you can use Wireshark.
Firefox has a great plugin called LiveHTTPHeaders that I think will get you what you are looking for. I'm not positive on the AJAX part of the question, but it's worth a shot. I consider LiveHTTPHeaders to be an indispensable tool for anyone doing web development.
Use Firebug
(source: getfirebug.com)
Otherwise use Wireshark http://www.wireshark.org/ if you want the swiss army knife of network capture tools.
There are lots of great programs out there that will do this. My answer would really depend on what you are trying to do.
Adding an HTTP proxy that logs requests will easily do the job.
You can also leverage browser plugins such as FireBug and Google's Page Speed to see the requests fly in realtime.
Jacob
I don't really understand where do you want to see the traffic. But if what you mean is browser and if you are using Firefox then Firebug will come handy.
So many great extensions for Firefox that'll give you that info:
Firebug
PageSpeed
LiveHTTPHeaders
You could also try using the developer tools in Safari or Chrome if you're not a Firefox fan.
If you use IE... why are you using IE? ;-)
Any personal proxy will do. Fiddler was already suggested.
For Firefox I would use the TamperData plugin.

How can I check my AJAX for browser capable?

I always have to check each and every browser to see if my website would work. Is there a website where I can check it with?
Update:
I don't really want just screenshots (which what browsershots do), I want to actually test the posting of my script.
You want a web site to check your web site for javascript compatibility? How would you expect it to know how to exercise your interface to trigger the proper interactions? Or are you thinking of it doing some sort of static code analysis? I think you are better off coding against a framework that has solved most of the browser-dependent idiosyncrasies and using it to check for browser capabilities before you use them. jQuery, MooTools, Prototype/Scriptaculous, etc. go a long way in solving these problems for javascript.
Note that you still need to worry about rendering your site, but you already have several answers for how to go about doing that based on web sites. Personally, I just maintain IE/Safari/FF/Opera/Chrome on my workstation and do significant checking in IE/FF and basic checking in Safari/Opera/Chrome.
Even when there exist websites that allow you to see a static snapshot of your site in several browsers, you should really test your page on them yourself, because there can be subtle, and not so subtle, bugs and differences that are only apparent when interacting with the webpage.
You can cover yourself quite a lot by testing in
A Gecko engine browser (Firefox)
A Webkit engine browser (Chrome, Safari, Konqueror)
Opera
AND IE6+
John Resig recommends checking the Yahoo graded browser support documentation.
If you write unit tests for your javascript, you could use testswarm http://testswarm.com
There are multiple options:
http://ipinfo.info/netrenderer/
These site will let you run multiple browsers and version without installing. You only need to install a plugin
http://spoon.net/browsers/
There are plenty of sites, just Google/Bing for browser compatibility check.
http://browsershots.org/ is a good one.
Although most of them just take a snapshot of the site, you might have to do the manual check for things like menus and dynamic content.
BrowserShots might do what you want if you can tell by rendering a particular URL whether or not things will work as expected.
In light of your update, you could still use BrowserShots by creating a page which tests each of your scripts and renders 'pass' or 'fail' as its content depending on whether they work or not.
Failing that, Multiple IE is quite useful for running various versions of IE on one PC which can otherwise be problematic.

Website performance measurement

I need a tool to measure a website's performance that's free and does not require any changes to be made to the code (jsp asp pages). All help is appreciated.
For performance measurement I recommend you YSlow, it's a Firefox add-on integrated with Firebug, it analyzes your web pages and tells you why they're slow based on the rules for high performance web sites.
Screenshot
Also with the Firebug Network Monitoring tab, you can see which resources are taking more time and bandwidth to download:
(source: getfirebug.com)
You could also use Fiddler which will work for browsers other than Firefox. (But will not profile javascript code)
See this post
The other answers to this question focus on performance of a single user of the site from their browser's point of view. If you want to test the performance of your server, for example, to see how many concurrent users you can support, you need to be looking at tools like JMeter.

Resources