The fastest way to define a test course Moodle using the CLI Screen
php admin/tool/generator/cli/maketestcourse.php --shortname=Course1 --fullname=Course1 --size=S
–size=S – under a 100 users in the course
–size=M – under a 1000 users in the course
add default password for all test students, write it in config.php:
$CFG->tool_generator_users_password='Yorepassword1!';