Skip to content

Web app testing

Bryan Hilbert edited this page Sep 29, 2020 · 2 revisions

This page gives a brief overview of ways to test the content of the web app. More specifically, when testing instrument monitor plots that are being developed.

Test using Bokeh

While developing your Bokeh plots, the easiest way to draw and examine the plots is to test using Bokeh itself (rather than using the web server). The tracebacks in this case are often much easier to interpret than those given by the web server.

To do this, call Bokeh with the name of your file for defining the plots. For example:

bokeh serve --show /path/to/jwql/website/apps/jwql/monitor_pages/monitor_ta_bokeh.py

Test on the web server

Once your plots look good when running via Bokeh, you can test them out using the web server. Detailed instructions for running the web server are given in the Running the web app locally page.

Interpreting tracebacks can be much more difficult in this case.

Some helpful hints:

  1. Open the Web Developer debugger in your browser. The Debugger and web Console tabs/options are generally the most helpful.
  2. If you need to check variable values, etc, since print statements won't work, you can instead raise exceptions and print the information you are looking for. Then the information will appear at the top level of the traceback.