Software verification and validation are needed for high-quality and reliable scientific codes. For software with moderate to long lifecycles, a strong automated testing regime is indispensable for continued reliability. Similarly, comprehensive and comprehensible documentation is vital for code maintenance and extensibility. This presentation provides guidelines on testing and documentation that can help to ensure high-quality and long-lived HPC software. We present methodologies, with examples, for developing tests and adopting regular automated testing. We also provide guidelines for minimum, adequate, and good documentation practices depending on the available resources of the development team.