on ā2025 Jun 03 12:22 PM
I have a CAP application which communicates with an external API (for user information).
I have written some simple test cases. All working fine. Now the more complex stuff should be tested and I need to mock my API.
As best with a static json response I can rely on.
So I tried to realize that but can't get a working solution.
Found something that looked promising...
But.. No luck with it.
Request clarification before answering.
Local testing can for instance be done by:
The provided data and handler for remote service is only loaded when running in development mode where no credentials are specified.
For convenience (separation) the mocked, remote service can be launched in separate terminal via cds mock <ext serv> --port <xyz>.
After, in another terminal, the normal cds watch command can be executed which will now run against the mocked service.
It may be needed to clean up the file .cds-services.json located in the user directory. On windows that would be in c:\Users\<user>\.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.