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=M
–size=S – under a 100 users in the course
–size=M – under a 1000 users in the course
add
$CFG->tool_generator_users_password='your password for all tests user';