Metric Testing

Adding automatic testing for metrics.