-1

I have setup an app using SAP Web IDE using my own mock data setup using metadata.xml.

The dataSource in my manifest.json is set up like so...

"dataSources": {
  "NorthwindModel": {
    "uri": "/here/goes/your/serviceurl/",
    "type": "OData",
    "settings": {
      "localUri": "localService/metadata.xml"
    }
  }
}

I know it's a dummy URI, but as the app works fine, pulling in the data from my JSON file in localService/mockdata, I can't see how this is relevant.

However, the issue I have is, when putting together an integration test using OPA5, the service metadata is never loaded...

https://webidetesting1974838-adddcbbb0.dispatcher.hana.ondemand.com/here/goes/your/serviceurl/$metadata?sap-language=6N

(404 not found).

Can anyone help?

Boghyon Hoffmann
  • 17,103
  • 12
  • 72
  • 170
Adam Harkus
  • 2,050
  • 2
  • 36
  • 64
  • Your mockserver needs to be initialized before the component loads. See, for example, https://openui5.hana.ondemand.com/topic/9bf4dce43b7943d0909cd6c58a933589. Please show us more details such as the folder structure, HTML documents, QUnit / integration test files, etc. The question is lacking in details which makes answering difficult – Boghyon Hoffmann Jun 29 '21 at 09:53
  • Like I said, even with the above setup when I run Index.html (with Mock data ticked) it pulls in the correct oData from localService/metadata.xml.... However when I run the test opaTest.qunit.html it doesn't have a tick box for mockdata in the run configurations, so the Northwind data is pulled in, and my list object isn't populated. – Adam Harkus Jun 29 '21 at 10:20
  • In order to find the _cause_, we need the information how your folder structure, HTML files, neo-app.json, run configurations, etc. look like. Please update the question with more details. It's hard to answer without details since Web IDE is no longer freely available to play around. – Boghyon Hoffmann Jun 29 '21 at 10:59

1 Answers1

0

The Answer?

Run configuration in WEB IDE

I ran the test as a 'Web Application' and ticked 'Mock Data'

No additional libraries needed!

Adam Harkus
  • 2,050
  • 2
  • 36
  • 64