Tests are useful in the process of learning. These consist in an efficient way of verifying the knowledge gained during a period of time. Either they are multiple choice tests or exercise tests, they are a control check which show whether the notions were understood. This paper presents a modality of generating optimized sequences of tests described by certain keywords which follow certain restrictions given by the user. These restrictions refer to matching keywords that characterize each test with the keywords given by the user. The user also has the choice to avoid as much as possibly certain tests that are characterized by some keywords, also given by the user. This generation is made using genetic methods, chosen for the variety of solutions and the lower usage of hardware resources.