People who come here from other countries are already citizens of those other countries. Your idea would create millions and millions of stateless persons, non-citizens. And what would you do with those born here who cannot, do not, or will not pass your test? Send them 'home'? Talk about creating an underclsass, talk about disenfranchisement, talk about a legal and Constitutional nightmare. It would not only be impossible, it would be a very, very bad idea.
Let's just control our borders and enforce the laws we have now instead of mucking with the Constitution or dreaming up cockeyed schemes.
As much as I hate it when my husband says this phrase, Robert Heinlein wrote about this. He envisioned a state where everyone was a legal resident, with certain inherent rights under the law, but full citizenship (defined as the right to vote and the right to hold public office) was earned through - in his story, at least - military service.
As it happens, it wouldn't be all that big a "Constitutional nightmare", considering that we actually started out with a system that gave legal rights and protections to everyone (except slaves), but only granted voting privileges to property owners. So it's not unprecedented for the United States to require some real involvement in the system in order to participate in it.