This verse was revealed in Madinah:
“…the first ten verses of this Surah were revealed at Madinah…” (Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an – Online Source)
“And whoever strives only strives for [the benefit of] himself. Indeed, Allah is free from need of the worlds.” Quran 29:6
29:6 – The true believer in the site of God is the one who strives in the way of God. Following all the commandments. Constantly doing good and shunning evil, pleasing HIS LORD.
Malik Ghulam Farid:
“2239. The verse gives brief but very apt description of a Mujahid – true striver in the way of God. High and noble ideals and consistent and constant effort to carry them out into actual practice is what in Islamic terminology is called Jihad, and the person who possesses these ideals and lives up to them is a Mujahid in the true sense of the word.” 
Tafsir Ibn Kathir:
“‘And whosoever strives, he strives only for himself.’ This is like the Ayah=verse,
‘Whosoever does righteous good deed, it is for himself‘ (41:46). Whoever does a righteous deed, the benefit of that deed will come back to him, for Allah has no need of the deeds of His servants, and even if all of them were to be as pious as the most pious man among them, that would not add to His dominion in the slightest.
‘And whosoever strives, he strives only for himself. Verily, Allah stands not in need of any of the creatures.’ Then Allah tells us that even though He has no need of His creatures, He is kind and generous to them.
He will still give to those who believe and do righteous deeds the best of rewards, which is that He will expiate for them their bad deeds, and will reward them according to the best deeds that they did. He will accept the fewest good deeds and in return for one good deed will give anything between ten rewards and seven hundred, but for every bad deed, He will give only one evil merit, or even that He may overlook and forgive.
This is like the Ayah=verse,
(Surely, Allah wrongs not even the weight of a speck of dust, but if there is any good, He doubles it, and gives from Him a great reward.) (4:40). And He says here:
‘Those who believe, and do righteous good deeds, surely, We shall expiate from them their evil deeds and We shall indeed reward them according to the best of that which they used to do.’” (Tafsir Ibn Kathir on Surah 29:6 – Online source)
Maulana Muhammad Ali:
“6a. As shown in 25:52a, the word jihad occurs in Makkan revelation frequently, and carries its proper significance of striving hard in Allah’s way. The suffering of persecutions and tortures at the hands of their enemies for the sake of their faith was no less a jihad for the Muslims at Makkah than their fighting in defence of Islam at Madinah.” 
Mufti Muhammed Shafi Usmani:
(And will not be put to test – 29-2). It is derived from Fitnah, which means trial or test. The believers, especially the Prophets and pious have to go through many trials in this world. However, they always come out victors in the end. These trials and tribulations sometimes come as a result of enmity of the disbelievers and sinners by way of afflictions, as have been experienced by the Holy Prophet and many other Prophets, and at times in the form of diseases, as was experienced by Sayyidna Ayyub. And for others many of these trial types are combined together.
Although the background under which this verse was revealed, according to many narrations, was the harassment faced by the companions of the Holy Qur’an from the disbelievers at the time of hijrah, but otherwise its message is common to all times. The sense is that the pious, saints and scholars will face the trials and tribulations in all times. (Qurtubi). …” 
Sayyid Abul Ala Maududi:
“8 The word mujahadah means to struggle and exert one’s utmost against an opponent , and when the particular opponent force is not pointed out, the word implies an all-out, many-sided struggle. The struggle that a believer has to make in the world, is of this very nature. He has to fight against Satan, who frightens him every moment of the possible losses he they have to incur for the sake of good and allures him with the benefits and pleasures of the evil. He has to fight his own self also, which exerts to make him the slave of its lusts.
He has also to fight all those men, from home to the world outside, whose ideology, trends, morality, customs way of life and social and economic principles may be in conflict with his Faith; and he has to fight that state too, which enforces its laws independent of obedience to Allah, and employs its forces to promote evil instead of the good.
This struggle is not of a day or two, but of a lifetime, of every moment of the day and night. And it is not a struggle in one field only but on every front of life. It is about this that Hadrat Hasan Basri has said: “Man exerts in the way of Allah, even though he may not strike one sword at any time.”
9 That is, “Allah is not asking you to exert your utmost because he stands in need of any help from you to establish His Godhead and keep it established and sustained. But He instructs you to enter this conflict because this opens the way to your own progress.
Through this way only you can get rid of the evil and follow the way of truth; through this way alone you can develop the ability and power to rise as the standard-bearers of goodness in the world and become worthy of Allah’s Paradise in the Hereafter. By waging this war you will not do any favor to Allah. but will only be helping your own selves. (Sayyid Abul Ala Maududi – Tafhim al-Qur’an – The Meaning of the Qur’an – Online Source)
Don’t forget to follow Discover The Truth on Facebook and Twitter. PLEASE help spread the word by sharing our
 The Holy Qur’an – Arabic Text With English Translation & Short Commentary By Malik Ghulam Farid,
 The Holy Quran Arabic Text with English Translation, Commentary and comprehensive Introduction by Maulana Muhammad Ali, page 785
 Maarif-ul-Qur’an Tafhim by Maulana Mufti Muhammed Shafi Usmani, volume 6, page 682