I want to know about the ruling of the Quran, Ahadith and the history with regards to taking an oath on Quran before testifying in a Court. Also, what about the people who ask you to take an oath on Quran or basically swear upon Quran on petty matters or even in serious matters to prove truthfulness?
An oath should always be sworn by Allah and nothing else. Yes, one ask a person to keep a hand on the Qur'an or on any other things considered sacred to impress upon the person the gravity of the oath. The Qur'an has spoken of a similar thing in relation to making a will in Surah Ma'idah as follows:
يَا أَيُّهَا الَّذِينَ آمَنُوا شَهَادَةُ بَيْنِكُمْ إِذَا حَضَرَ أَحَدَكُمُ الْمَوْتُ حِينَ الْوَصِيَّةِ اثْنَانِ ذَوَا عَدْلٍ مِّنكُمْ أَوْ آخَرَانِ مِنْ غَيْرِكُمْ إِنْ أَنتُمْ ضَرَبْتُمْ فِي الْأَرْضِ فَأَصَابَتْكُم مُّصِيبَةُ الْمَوْتِ ۚ تَحْبِسُونَهُمَا مِن بَعْدِ الصَّلَاةِ فَيُقْسِمَانِ بِاللَّـهِ إِنِ ارْتَبْتُمْ لَا نَشْتَرِي بِهِ ثَمَنًا وَلَوْ كَانَ ذَا قُرْبَىٰ ۙ وَلَا نَكْتُمُ شَهَادَةَ اللَّـهِ إِنَّا إِذًا لَّمِنَ الْآثِمِينَ
Believers! When death approaches someone among you, and he is making a bequest, the testimony will take place in a way that two just men from among you will act as witnesses, or if you are travelling and the calamity of death overtakes you, then two just men from outside you should discharge this responsibility. [In the first case,] if you have any doubts [about it], detain them after the prayer.Then they should swear by God: "We will not accept any price for this testimony even if some kinsman offers it, neither will we hide this testimony of God. If we do this, then we would be among the sinners." (5:106)
Here God has stated that if one has doubts about witnesses then one can making them swear an oath after they have offered their ritual salah. In this way, they will be under the effect on a noble and sacred practice and hence would most probably give a honest testimony. Same can be done by placing the hand on the Qur'an. There is no problem with that in our opinion.
But one cannot and must not swear by anything other than Allah.
For details see the chapter on oaths and their atonement in Ustaz Ghamidi's book Meezaan. Link is here