Compute test error