On 27/08/2012 00:13, Paul Rudin wrote:
> I understand that - but I want to do it as part of a set of automated
> tests rather than manually.
d^3p has suggested a way to know whether MathJax is load by testing the
"MathJax" variable. Another things that you might want to know if
whether a Math Processing Error occurred. One way to do that is to add
some javascript code in the errorSettings.message configuration
parameter but note that the next release will have a signal for that
purpose (see
https://github.com/mathjax/MathJax/issues/246)
As for how to automate the verification, that seems a bit out of the
scope of MathJax which is just a Javascript library. But using the
javascript tests mentioned above, you could send AJax requests to your
server to indicate a problem. The server would handle the request by,
for example, sending you a warning message by e-mail (depending on what
installation is available to you, of course). Peter also mentioned the
Selenium testing system:
http://seleniumhq.org/. This allows to write
program to load Web pages in browsers and control what's happening. The
MathJax test framework (
https://github.com/mathjax/MathJax-test) relies
on it and has worked pretty well so far. You could certainly use
Selenium too for your project.