Difference between revisions of "Website:Testing And Profiling"

From WormBaseWiki
Jump to navigationJump to search
Line 1: Line 1:
Outdated - please go to [http://wiki.wormbase.org/index.php/Unit_Testing Unit Testing]
Line 5: Line 5:
= Unit Testing =
= Unit Testing =
please go to [http://wiki.wormbase.org/index.php/Unit_Testing Unit Testing]
= System Testing =
= System Testing =

Revision as of 15:38, 9 July 2013

This document describes testing and monitoring of the web application.

Unit Testing

please go to 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 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
$ nytprofhtml --file /usr/local/wormbase/website/nytprof.out --out ~/nytprof --delete