This paper considers tests of the parameter on endogenous variables in an instrumental variables regression model. The focus is on determining tests that have some optimal power properties. We start by considering a model with normally distributed errors and known error covariance matrix. We consider tests that are similar and satisfy a natural rotational invariance condition. We determine tests that maximize weighted average power (WAP) for arbitrary weight functions among invariant similar tests. Such tests include point optimal (PO) invariant similar tests. The results yield the power envelope for invariant similar tests. This allows one to assess and compare the power properties of existing tests, such as the Anderson-Rubin, Lagrange multiplier (LM), and conditional likelihood ratio (CLR) tests, and new optimal WAP and PO invariant similar tests. We find that the CLR test is quite close to being uniformly most powerful invariant among a class of two-sided tests. A new unconditional test, P*, also is found to have this property. For one-sided alternatives, no test achieves the invariant power envelope, but a new test -- the one-sided CLR test -- is found to be fairly close. The finite sample results of the paper are extended to the case of unknown error covariance matrix and possibly non-normal errors via weak instrument asymptotics. Strong instrument asymptotic results also are provided because we seek tests that perform well under both weak and strong instruments.