But the problem arises when using Measurement tool the infowindow popups on every click on the map. Since I haven't placed any listeners or code for fetching the features and showing the info window. I don't know how to stop this behavior.
on map object you can call setInfoWindowOnClick(false);
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.
This will only stop the info window from coming up. The query will still go to the server to fetch the features.
I did this by using IdentifyTask and then setting InfoTemplate based on the layer on getting the result from the IdentifyTask.