2

I have a web page with lots of JavaScript. I am supposed to optimize the performance of the page.

Ideally, I would like to set up an automated test which would hover around the page and click on a couple of things. Upon completing the test I'd like a profile of the JavaScript execution on the page. This way I can make changes and see if the page will run faster or not.

If I cannot meet this ideal goal, what is the best I can do in terms of automating and standardizing tests of performance for my webpage?

Joe
  • 7,922
  • 18
  • 54
  • 83
  • "a test which would hover around the page" - What does this mean? –  Jan 22 '13 at 18:54
  • Have you tried the profiling tools in Chrome or Firefox? – Pointy Jan 22 '13 at 18:54
  • Hover the mouse around the page is what I mean. – Joe Jan 22 '13 at 19:16
  • Yes, I want to use something like the profiling tools in Chrome and Firefox. But I would like to have the test I perform be standardized and automated. – Joe Jan 22 '13 at 19:17

1 Answers1

1

That's hard and someday I will make it part of my development routine. The only proven solution is continuous development practice:

Use automated JS tests together with build server

Good frameworks list for js testing you may find here

Your build server have to has support for client javascript execution, as soon as I know there is phantomJS script which has many integration with different build servers, for example with one of the well known Jenkins.

To be complete, you may use tools like Selenium instead of build server, but personally do not feel it is right way, though it may works good as well.

Community
  • 1
  • 1
dmi3y
  • 3,482
  • 2
  • 21
  • 32
  • Will any of these let me do benchmarking to see how my page responds to various mouse movements on the page? – Joe Jan 22 '13 at 21:03
  • 1
    yes, I guess with bit on patience you may write appropriate tests, note that movements itself are nonsense, what's matter is hovering/clicking, and probably scrollings. all that you may emulate with javascript. – dmi3y Jan 23 '13 at 05:24