Component testing (also known as unit testing) involves testing individual software modules or units of code to determine if they are fit for use. Risk-based testing prioritizes tests to find critical defects early by testing risks, which should be reassessed regularly based on stakeholder input. Static analysis tools can detect undefined values and divide by zero errors during code execution but not memory leaks.