on 11-22-2022 1:31 PM
I'm trying to setup Mock Server and use local JSON files as sample data on my new empty UI5 application, I've done the following steps but Mock data is not returning. Can someone tell me what am I doing wrong ?
Steps :
Normally "index.html" uses "component.js" file to bootstrap the application. But for testing , the application should start by calling this "mockServer.html" file instead of "index.html" as in the example from Demo Kit.
So, to change the start page to the mockServer.html file, I've opened the Project Settings > Annotation Modeler > Run Configurations and created a new Run Configuration.
In mockServer.html file, I've modified the paths according to my project name , so it can address the "/test/initMockServer.js" file which I've copied from example application. (My project name was "mocktest" and namespace was "TRAINING" .. it's just an empty application )
After all of it, I start the application and I'm able to see in Chrome debugger that "mockserver.js" has been called and "oMockServer" object is created with mockdata array attribute coming from JSON file as below :
No data is returning.
Do you see anything wrong ? Is there anyway I can test the Mock Server in this UI5 application on Chrome's debugger by console or watch features ?
Thanks in advance
P.S. I've already upgraded my UI5 version to 1.107.1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Fabio !
User | Count |
---|---|
74 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.