automating testing framework across many documents with for and range function