1

I'm looking for help to automate performance test of my single page angular application. We are using protractor for E2E tests and would like to add performance tests. Our first target is to be able to measure simple timings between e.g. Button Click and finish of loading of a svg. (We have requirements that state that the load time must be less than 2 secs. So we need to assert those things.)

My first idea was to use browser-perf/ protractor-perf. Unfortunately, protractor-perf doesn't seem to work with the latest chrome version and in general browser-perf is just measuring page load times which wont change on a single page application.

My latest idea is to simply use performance.now() and measure the times 'manually'. This has the big disadvantage that it is not supported on iOS Safari. ( I need the tests to run on iPad, too.)

So my question is: Is there someone who has a good idea how I can include performance measurements into my protractor tests, measuring time intervals like the one I mentioned above?

alexstdev
  • 52
  • 9
  • `proractor-perf` is the tool for the job and something we've used. Can you add more details about it not working in chrome. Just FYI, just a bit related and may be smth interesting for you: http://stackoverflow.com/questions/27596229/browser-performance-tests-through-selenium. – alecxe May 06 '15 at 14:04
  • When I'm trying to run a protractor-perf test on Chrome I get the error message that the Timeline feature is deprecated and that I should use timings. Thats with the latest Chrome (v 42.0.2311.135) and Chromedriver (2.15) and Selenium 2.45.0. I could not find a suitable solution to this. – alexstdev May 07 '15 at 10:53

1 Answers1

2

The latest version of browser-perf now works with the latest version of Chrome. You should simply reinstall protractor-perf and it should start working. This was fixed recently - https://github.com/axemclion/browser-perf/issues/31.

Also note that browser-perf also measures things like framerates, area painted, etc, which may be useful for single page apps.

axemclion
  • 562
  • 3
  • 8