As part of my continuous integration server, I am running a bunch of performance profiling. If the performance profiling tests don't crash and pass a threshold then it declares them successful. I then manually take the log files, convert them to JSON, plot them in a web browser, then print the page as a PDF. This provides a nice little report as an artifact of the build.
Question I have, is there any way to programmatically launch the web browser, let it render, then print to PDF, then close? I'd like to make this process part of my CI instead of doing it manually. I'm running Ubuntu 16.04, firefox, and prefer to be headless.
My test is producing a bunch of ROS bags (basically log files for those not ROS-initiatied). I then replay the ROS bags into rosbridge (a websocket interface to ROS). My web page has HTML/JS that connects to rosbridge and plots the results in plotly.js (a very nice recently open source'd javascript plotting utility) .