Q:

Joomla 3 temporary accounts

Developing a testing system as a diploma.
Got a question. registration for users who will take the test should be avoided.
I thought to create temporary accounts, which after the passage will be deleted.
1) If you create such a mechanism in the module in which the test is created, will it be safe?
2) How to request contact information when you first enter?

A:

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.

