Boeing uses a design guide to determine what every safety margin is. I can't share everything, but the safety margin is affected by many criteria including:
- Inspection criteria during manufacturing processes (penetrant/radiographic/magnetic particle inspection)
- Inspections during in service operation
- Failure modes
- Criticality of failure (will there be a negligent/minor/severe/catestrophic effect from failure?)
- Material quality
- Accuracy of load calculations
- Manfacturing process (casting factors/machining factors/temperature factors)
- Impact loads (a flap has to take a birdstrike)
- Abuse loads (what if someone steps on the cover for something not designed to take 200lbs?)
There is a lot of analysis and the science is usually done through FMEA (Failure Modes and Effects Analysis). Safety margins can range from about 1.5 to 4. Sometimes there are multiple margins built in. For example a maximum pilot load might be 200 pounds of force which makes everything adequate with a safety factor of 1. However other areas have a more predicted or measured force and the factors are built up from experience.
Many times improving the manufacturing process can allow the safety factor to be lowered. It might cost more to make something cast out of aluminum than magnesium, but the safety factor could be lower and the overall weight could be less. It takes highly skilled and experienced engineers to be able to make the correct decisions. In aerospace there are always outside engineers that focus just on materials or stress so that everything is thoroughly reviewed.
As far as testing goes, almost everything is tested. There use to be more destruction testing than there is now as models have approved. However the FAA almost always likes to see things proved by test rather than analysis. Every part from a stowbin latch to the landing gear actuators go through qualification testing. They are tested at as high as 4x max load. Fatigue and ultimate load tests are done as well as potentially a myriad of other tests. Boeing has a huge lab that has been testing every actuator/component for the 787 for years. They have everything imaginable being tested including a full sized mockup of the landing gear that gets cycled a hundred thousand times to look for possible errors. In general you always want to find a few things during qualification testing because if you do not find issues, you probably overdesigned your system and it is too robust/heavy/inefficient.
Hope that helps!
[Edited 2009-10-22 10:22:10]
If you have never designed an airplane part before, let the real designers do the work!