Follow these steps to create a test in TestGen and transfer it into the Moodle learning management system (LMS) as a question bank.
Select "New test" from the File menu. On the Startup screen, click Web Test. Then choose the Moodle option and click OK.
Create the test, whether choosing from a testbank or adding your own questions.
Select "Export" from the File menu, select the Moodle option from the drop-down menu, and click OK.
Save the test export file as an .xml file. Review the filename and destination where the .xml file will be saved. (By default, the name matches its original .TST file and the saved location is the TestGen "Tests" folder.) You can change the destination, if desired, but note that you will later need to locate the file during the import process into Moodle.
Log in on your Moodle system and navigate to your course.
Under "Course Administration" choose "Question Bank" and then choose "Import."
On the Import page, select "Moodle XML format" and locate the .xml file you exported from TestGen.
The test will be imported into the Question Bank with a category name that is the same as the test name.
Finally, create a quiz from the imported test items in the Question Bank.