Website:Testing And Profiling

From WormBaseWiki
Revision as of 15:14, 9 July 2013 by Acabunoc (talk | contribs)
Jump to navigationJump to search

Outdated - please go to Unit Testing


This document describes testing and monitoring of the web application.

Unit Testing

System Testing

  • Validation (HTML/CSS/XML)
  • Security
  • Accessibility
  • Usability
  • Browser compatability
  • Performance and stress testing


Profiling the Web Application

Debugging notes:


Profiling Czar duties

  • Explore profiling options and discuss
    • Built-in server and Catalyst::Stats
    • -d profilers: Devel::NYTProf
  • Add dynamically configurable profiling
  • Identify and report bottlenecks
  • Develop caching mechanism of ajax-requested widgets

Using Devel::NYTProf

Profiling under the development server

$ cd website/
$ perl -d:NYTProf script/wormbase_server.pl

Use Apache's ab tool to simulate requests (-n) and concurrency (-c):

$ ab -n 1000 -c 5 http://localhost:3000/path/to/a/slow/page   // Need to use 127.0.0.1 on Mac OS
$ GET http://localhost:3000/quit
$ nytprofhtml --file website/nytprof.out --out ~/nytprof --deletee

Unfortunately, ab can only request a single URL at a time.

Profiling under FastCGI

And here's how to profile a specific page running under Apache/FastCGI:

As a socket server (assuming that apache is configured as described in the deployment documentation, listening on port 8000.

cd website/
perl -d:NYTProf script/wormbase_fastcgi.pl \
  -l /tmp/wormbase.sock -n 5 -p /tmp/wormbase.pid

In a separate shell...

$ ab -n 1000 -c 5 http://127.0.0.1:8000/path/to/a/slow/page
$ GET http://127.0.0.1:8000/quit
$ nytprofhtml --file /usr/local/wormbase/website/nytprof.out --out ~/nytprof --delete