when to use hypothesis testing and regression
They're not related. Hypothesis testing is a form of statistical inference. Regression testing is the process of making sure a new release didn't break any existing functionality. You might use hypothesis tests as part of your regression tests, but that's as much of a connection as there is.