Q: What is the best practice way to dynamically configure a module when runner.html is executing an E2E test? I am developing an Angularjs application and using a different module to run E2E tests with ngMockE2E. I'm currently manually changing a boolean variable in the app.js file to configure the app to use ngMockE2E for testing and then back to not using it for normal operation. 
What is the best way to dynamically configure a module with when runner.html is executing an E2E test?
var testing = 'false';

var myApp = angular.module('myApp', ['ngResource']);

if (testing=='true') {
    var myAppDev = angular.module('myApp', ['ngResource','ngMockE2E']);

    myAppDev.run(function($httpBackend) {
        var player = {name: 'Sandra'};
        $httpBackend.whenGET('player.json').respond(player); 
    });
}

