As an Automation QA Engineer I'll like to know if there's a repo it an already made test script that Moodle uses in testing.
Moodle uses the Behat framework for automated testing. The test scrips are stored in the main code-base. Look for folders called .../tests/behat. https://docs.moodle.org/dev/Acceptance_testing