Updated code for random_test.py and .yaml