the testing of your faith produces endurance
God does the testing, that is, he finds out how much the believers trust and obey him. Alternate translation: "when you suffer hardships, God is finding out how much you trust him. As a result, you will become able to endure even more hardships"