If this life is meant as a test for us humans, why does god test each one differently?

A baby who dies immediately after birth is guaranteed to go to heaven, while another person who lives till 80 may have to go through suffering of poverty, death of loved ones and risk sinning and going to hell.

How is this fair? Shouldn't all humans be tested equally? How can god send someone to heaven without having the chance to prove himself/herself by default?