Refactored the end to end test
Added a script to run the end to end tests