Thank you for your question. God didn't take the concent of His creation before creating it. Perhaps you are referring to His pact with humans when they responded positively to Him being their Lord? If that is the case then this is one of the specifics found in the Quran and once the Quran has been established as being the book of guidance from God then there is no need to prove each and every specific. Further, this issue can be interpreted as the natural disposition of the human to seek God. If the atheist is not willing to accept that they have that disposition, that doesn't matter as this position is a theological one and so there is no need to convince an atheist as long as the issue is consistent within the theological framework.
As for the second question, God created mankind out of His Mercy and that included the creation of vicegerents on the earth. The necessity of trial is due to the nature of reward which is given for praiseworthy action. There is no praiseworthy action if it hasn't really taken place or if it is forced. Therefore a human has to be free to act and this is the meaning of trial.
May you always be successful