title: Using Protractor with $httpBackend correctly
body: <p>I've read about how Protractor works, I've written several E2E tests in it and still I feel uncomfortable about using it with <code>$httpBackend</code> service and I think it's possible I'm missing an important part of the picture.</p>
  
  <p>In order to have the HTTP calls mocked out, I'd need to use <a href="https://docs.angularjs.org/api/ngMockE2E/service/$httpBackend" rel="nofollow"><code>$httpBackend</code> service</a> provided within Angular's <code>ngMockE2E</code> module. To have that module included in the application I'm testing, I'd need to configure it when bootstrapping my main module, as its dependency, like this:</p>
  
  <pre><code>angular.module('myApp', ['ngMockE2E', 'bunch-of-other-dependencies']) 
  </code></pre>
  
  <p>It effectively means I need to have the separate initialization for my E2E tests from the production initialization. This also means I need to have the separate <code>index.html</code>. </p>
  
  <p><strong>Maintaining those 2 additional files</strong> that are "almost" identical to its roots seems cumbersome. Moreover, separate index and module definition means that the <strong>tests will be testing on slightly different application</strong> than the production, which for me seems to be against its purpose.</p>
  
  <p>Do I understand the puzzle here correctly or am I missing something?
  Are there any better solutions to run backendless E2E tests with Angular?
  Or maybe at least there are some workarounds to minimize the impact of the maintenance annoyances, if they are really unevitable?</p>