BOC stands for Bank of Canada, and the BOC Qualifying Rate is the minimum rate that Lenders will use to qualify you. The Stress Test Rule says, that lenders need to qualify you with either the BOC Qualifying Rate or their rate + 2%, whichever is greater.
Say the BOC rate is 5.25%, and your lender is offering you 4.71% for a 5-year fixed rate. Now your lender has to qualify you using the greater of 5.25% OR the contract rate + 2%, which is 4.71 + 2 = 6.71%. The lender has to use the greater of those.
You don't necessarily pay the 6.71% interest, but the lender needs to see that based on your income, you can afford to pay a mortgage at 6.71%.
How does the lender know I can afford it?
Well, that's when the GDS/TDS kicks in. The rule is that your debt (visa payments, car loans) and property-related obligations (mortgage, property taxes, heat, condo fee.) all have to sum up to be less than a percentage of your income. Say less than 42%.
The percentage is called TDS (total debt service), and it changes based on the lender's policies, risk appetite, your down payment amount and your credit score.