How do you decide when to use manual testing versus automated testing?

Technical