mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

Need help to configure protractor plugin for already deployed Non-Angular APP #84

Closed abhinaba-ghosh closed 4 years ago

abhinaba-ghosh commented 4 years ago

Hi,

  1. I have a non-angular application and for whole test lifecyle I run protractor with : await browser.waitForAngularEnabled(false);

  2. My application is already deployed to a server with URL like: https://10.118.128.23/ABC/home.aspx

So, I actually can not start my app under test with serve.js file as shown here. [https://github.com/ng-apimock/demo/blob/master/protractor-plugin/serve.js]

Please suggest, in this circumstances what should be my protractor configuration and how to use ng-apimock.

TIA

mdasberg commented 4 years ago

@abhinaba1080 this is only going to work if you are able to add a middleware option to your http server. Because once you have deployed your application, the xhr calls to your backend will go directly to your backend.

Isn't there a way to serve your application locally?