For backtesting to generate meaningful results, it is asked of traders to develop their strategies with good faith without being partial or bias as much as possible. That means developing a trading strategy without being dependent on data used in backtesting. It is harder than saying because most traders develop their strategies on the basis of historical data. They need to be strict about testing with different data from those they train their trading strategy model. Otherwise, backtesting will be providing results that would be of use.
Similarly, traders are also asked not to employ data dredging i.e., a wide range of hypothetical strategies are tested against the same set of data producing positive results which fail in the real-time market because of availability of many other strategies which beats the market over a specific period of time by luck or chance. Data dredging is also known as Cherry Picking.
One way of making good use of backtesting is to use the strategy in a relevant time period and then backtest it with data from the different time periods. If the relevant and different time period results are similar then it is a very likely valid trading strategy.