If you are creating a test questionnaire page where visitors fill out test questions as guests and submit their answers, then the whole process is usually handled by secure session/user/csrf tokens which is (created and) submitted together with their filled out tests Forms. The questionnaire Form should include fields like name, email address and CSRF form token (as hidden field) beside the test questions.
You can study of creating front-end forms in Joomla 3 deeper here: https://docs.joomla.org/J3.x:Developing_an_MVC_Component/Adding_a_front-end_form
Joomla Form creation extensions, I think, all have solved this question already.
So the approach of understanding and answering your question is the same as web stores solved this issue by letting visitors to place an order in web shops without registration - as guest users. If I understood your question correctly. I hope this can help you.
Additionally, you can also password protect your test questionnaire Form (pages) with available Joomla extensions, thus it will be unavailable for unintended public. You do not really need registration that way.