I would only run main() when I wanted to generate a new Golden Master. The most common case involves the output changing (a test run fails) and then deciding that the new output is OK. (This is generally how to use Golden Master.)
Since I don't do this often, I don't need to make this part of any automated build or test run.
I have another article here that explains the Golden Master technique in more detail. http://blog.thecodewhispere...
Finally, I built this main() so that it didn't even need a command line argument, so you run it like any other command line application, either from a shell or using the Run command in your favorite IDE.