John Gills Exposition of the Bible Commentary - Psalms 17:3
Thou hast proved mine heart ,.... This properly belongs to God, who is the searcher of the heart and reins, and is desired by all good men; and though God has no need to make use of any means to know the heart, and what is in it; yet in order to know, or rather to make known, what is in the hearts of his people, he proves them sometimes by adversity, as he did Abraham and Job, and sometimes by prosperity, by mercies given forth in a wonderful way, as to the Israelites in the wilderness, ... read more
Matthew Henry's Complete Commentary - Psalms 17:1-7
This psalm is a prayer. As there is a time to weep and a time to rejoice, so there is a time for praise and a time for prayer. David was now persecuted, probably by Saul, who hunted him like a partridge on the mountains; without were fightings, within were fears, and both urged him as a suppliant to the throne of mercy. He addresses himself to God in these verses both by way of appeal (Hear the right, O Lord! let my righteous cause have a hearing before thy tribunal, and give judgment upon it)... read more