it is indeed merciful, Allah tests people, sometime in extreme opposite ways. A very poor person and a very rich person, are both being tested. the rich bcome arrogant and greedy, not giving chairity or refusing to give up power(look at dicators of middle east) and rather kill people to stay on power...ect
poor people in ISLAM have a high status. the poor will enter paradise far before the rich and powerful(kings, politicans).
anytime a person struggles, even if its a headache or somthing as big as Hunger,starvation poverty,cancer ...ect erases sins
You do realise this nonsense is based on the just world theory, a theory that is completely false. What you are suggesting is the same idea buddhists have of karma, that if you are experiencing suffering you somehow deserved it. It is a perverse and evil idea indeed, and one that religious nutjobs somehow relish in telling others about. What did those children murdered at school in connecticut do to deserve such a test? By telling yourself that these things happen for a some unknown reason because the almighty has some twisted plan is a complete cop out, it is a way for humans to avoid taking responsibility for themselves and their community. Bad stuff happens because humans are too busy being self centred and following religious obsessions rather than taking care of their fellow man. If humanity put as much effort into helping each other as it does to being focused on an imaginary deity, the world would be far better off, and GOD would finally get the peace and quiet he deserves.

It also makes it easier to rationalise tragedy as humans like to make sense of the world as part of their survival strategy. The just world theory also stems from a belief, that BAD things happen to BAD people and bad things won't happen to them because they are GOOD. The JUST WORLD concept has been proven to be completely FALSE, but ironically, some psychologists suggest you will have better mental health if you believe in it, the alternative is to be aware of the incredible INJUSTICE of the world and this can have a negative impact on ones mindset, it may also mean you may have to begin to do something about it, as your conscience would struggle with this realisation.
The JUST world attitude has been around for a long time (KARMA), and many moons ago a man by the name of John Bradford, after seeing criminals being led to the scaffold uttered the words 'There but for the grace of God, go I' meaning, I too, like someone seen to have suffered misfortune, might have suffered a similar fate, but for God's mercy. He didn't enjoy that grace for long, however. He was burned at the stake in 1555.