There is no definitive answer or rule on when to use smoke testing or sanity check, as it depends on various factors such as the size, complexity, and nature of the product, the type and frequency of the changes or fixes, the resources and time available, and the expectations and standards of the quality assurance team and the customers. However, here are some general tips on how to choose the best testing strategy for your project. First, use smoke testing when you have a new or major release of the product, when you want to check the basic functionality and stability of the product, and when you have limited time or resources for testing. Second, use sanity check when you have a minor or incremental release of the product, when you want to check the rationality and consistency of the product, and when you have sufficient time or resources for testing. Third, combine smoke testing and sanity check when you have a complex or hybrid release of the product, when you want to check both the basic and specific functionality of the product, and when you have a balanced time or resources for testing.