Website:Testing And Profiling

From WormBaseWiki
(Redirected from Testing)
Jump to navigationJump to search

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/

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/ \
  -l /tmp/wormbase.sock -n 5 -p /tmp/

In a separate shell...

$ ab -n 1000 -c 5
$ nytprofhtml --file /usr/local/wormbase/website/nytprof.out --out ~/nytprof --delete