Javascript code to generate by location report test scripts