Doesn't make any difference. Most people just test cold because all the water is the same and hot water will be the same as cold.
With pH, you can test straight out of the tap, and then let the water stand for 24 hours before testing it again. If the pH changes after 24 hours, then it is being artificially buffered at the water company and the pH in your tank will change 24 hours after a water change. To prevent this you can hold the water in a plastic bucket/ storage container for 24 hours before dechlorinating and using it. Try to aerate the water while it's in the holding bucket and for 30 minutes after you dechlorinate it.