Hi,
There are a variety type of Hausman tests (e.g. HAC robust or HCCME robust ones). Hausman specification test is also known as Durbin-Wu-Hausman test due to the contributions by Durbin, Wu, and Hausman. The test is used to test whether OLS estimator is consistent when your underlying variables are treated as exogenous. It is often used in GMM estimations. Of course, in linear models, it is generally used in 2SLS estimator. Note that Hausman test often involves Moore-Penrose generalized inverse.
Sargan test (Sargan 1958) is equivalent to Hansen's (1982) J-test in linear models. In more general Data generating process, the J-test is used to test whether a specific set of instrumental variables are orthogonal to the error term in the underlying model.
However, Sargan or Hansen's J-test often performs poorly, particularly in models with serrially correlated error term.
These tests are very much easier to be implemented in Gauss. Eviews is not very straightforward though it can achieve it. I have Gauss programms for these tests upon request
Hope this is of some help .
Best wishes.
Chengsi