"Indeed, We guided him to the way, be he grateful or be he ungrateful," Surah Al Insan (Chapter 73 verses no. 3)
We can choose to be grateful or be ungrateful. We can come to the conclusion by observing that we have total control over what to pay attention to and what to ignore. Free will is not free in the sense that we are the creator acting without the will of Allah - rather we have gifted control over our thinking and decisions.
Consider this example to understand how free will functions in human life: Think of a child sitting behind the wheel of a vehicle controlled by you (you are an adult and a perfect driver). You are letting the child drive so you can test him/her. The child has been given full control (gifted control) to steer the vehicle to any direct he/she wants. The real controller is you - the child has been given the impression that he/she is the controller, when is reality you--being the driver--know very well that you are the real causer and possess all the control of the vehicle. The control given to the child was only intended for testing.
"There shall be no compulsion in the religion. The right course has become clear from the wrong. So whoever disbelieves in Taghut and believes in Allah has grasped the most trustworthy handhold with no break in it. And Allah is Hearing and Knowing" Surah Al Baqarah (Chapter 2, verse no. 256)
Whenever Allah commands people to ponder over creation to understand and reach their Lord, He is actually commanding them to use free will to their own advantage. Free will is nothing but "conscious control" given/gifted by the Creator. You have the liberty to pay attention to any thing. You can think of any thought and dwell on it until it becomes your habitual thinking. No matter what is going on around you, you have total control over not to pay attention to it.
If there is no free will (freedom to choose desired thoughts or desired decisions), there is no point of testing humans.