Added getSource support to the test page

Added getSource support to the test page
still think this is a good idea, so that you can keep the code inside this function generic.