Mean and Variance of Feature Scaling
It doesn't make sense to standardize your test set with the mean and variance computed on the test set. At best the test mean and variance will be close enough to the training mean and variance to not break your model - but why not guarantee they are the same by using the same standardization procedure for both. Typically it is best to choose one of the following:


Compute mean and variance on entire data set (train + test) and use these to standardize each set.
Compute mean and variance on train set and use these to standardize each set.


If you are not worried about leaking information from the test set then choose (1), otherwise choose (2).

If you standardize the test set with different values than the training set you might end up with train and test data from different distributions, which will lead to failure to make accurate predictions.