automon
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
Automon (as in "automatically monitor", pronounced "Ottomon") is a testing utility for Beebrain that watches the directory the source code is in and runs tests whenever any source file changes. It tests every .bb file in a given directory and sounds an alert if the JSON output or the graph image change from their stored reference states. It even shows a visual diff of the graph images if the images change. Whenever we find a new bug, the protocol is that we put the .bb file in the private suite -- github.com/beeminder/privatesuite -- and create a gissue pointing to it. It should then stay in the test suite forever to serve as a regression test. Automon works by storing baseline output files in the data/jsref directory, assuming "data" is the specified test suite directory. Every time Automon runs it puts the latest output in data/jsout. [TODO: change those to bbref and bbout] *Important*: jsbrain_server needs to be running! The simplest usage is ./automon.py data which goes through the .bb files in the 'data' directory and generates reference outputs, if they don't already exist, for these inputs. If they do exist it makes (literal) noise if it detects differences. Automon can monitor multiple directories for any changes to the files inside to trigger reprocessing of the bb files. For example: ./automon.py data ../road/src monitors both the Beebrain source files and the bb files in the data directory to trigger reprocessing.