I am writing an end-to-end test using Protractor for my Angular application. I can mock httpBackend for unit test but I want to actually call the server and get the JSON re
I'm working through this myself at the moment. The short answer I think is that you set up your application exactly the same as if you were manually testing it yourself - so Protractor is really just a robot user, it has no (well, almost no) access to the internals of your application.
So, if your application needs a web server (and most do), then you start up that web server, then have protractor connect to your application via the browser and exercise it.
For my case, I'm aiming to use grunt to call a task that does basic database setup before it starts running my protractor e2e tests - this should give me a known database state.
For an example of this, I've been writing a tutorial for using Rails 4 with AngularJS, the section on using protractor for e2e testing is not rails-specific and might be useful: http://technpol.wordpress.com/2013/11/16/5-end-to-end-testing/