The only way of determining the long-term effects of moisture on anything with 100% accuracy would be to carry out an extended test under realistic natural environmental conditions. Of course that would hardly give information of immediate value to a manufacturer, especially when products are intended to survive a long and arduous life, for example in military service.
To get meaningful results more immediately, we have to make the assumption that the effects of moisture can be accelerated, but not changed in nature, by subjecting the parts simultaneously to high temperature and high humidity, for a relatively short time (typically 1,000 hours = 6 weeks) which would be equivalent to a much longer period in more normal surroundings.
Typically such a test would be run at 85°C/85%RH as a minimum, but where the parts are expected to be particularly resistant to moisture, both temperature and relative humidity would be increased, and the part might also be powered-up during test. However, as with any accelerated test, care has to be taken to ensure that the acceleration assumption is not compromised by introducing other failure mechanisms. This sets limits on the temperature and voltage that can be applied, and demands that no moisture should condense onto the units under test.
Minimising the adverse effects of moisture equates to improving the moisture resistance of the interfaces that would normally provide paths for moisture. Choice of materials and processing conditions must keep stresses to a minimum, both those that result from CTE mismatch and those that are induced during package moulding and lead trimming and forming. And, as it says in the final paragraph of the text, you have to be careful about lead-frame design, the compatibility and adhesion of the package materials, and the cleaning and plating processes used after moulding.