(Not a Teacher)
Though I wouldn't say that the first sentence is wrong, it does sound weird. If you want to keep 'purpose' singular, I would write 'the purpose of testing' to make this sentence sound better.
The second sentence sounds the most natural.
Also, I would replace 'remaining' with 'remainder'.