Shake, rattle and roll
Outer space is extremely hostile. Spacecraft have to survive extremes of hot and cold, radiation, magnetic fields, meteorites, debris from other spacecraft and lack of air.
Since spacecraft are expensive to build and launch, we want them to last as long as possible. If satellites are to survive in space for many years, they must undergo (and pass!) many tests on the ground.
The first hazard that satellites have to overcome is the loud noise and shaking during a rocket launch. This is tested by shaking the satellite and blasting it with sound coming from huge speakers inside a special chamber.
The second hazard that satellites have to overcome in space is to survive extreme hot and cold temperatures. Extreme heating from the Sun is simulated in an airless chamber fitted with powerful lamps and mirrors. Very low temperatures are produced by pumping liquid nitrogen through pipes in the chamber walls.
To make sure that the electrical systems work, the satellite is placed in a powerful magnetic field that can cause electrical failures. Computers keep a check on everything that happens on the spacecraft during these ordeals.
Over a year or more, each part that makes up the spacecraft is tested and retested. When the spacecraft is put together, they are tested again. Only then will the engineers be happy that their baby will be a success when it reaches orbit.