Pull metric tests out of context, do own test init

This avoids problems with trying to change the configuration of a test
that has already been created.