Monday 17 August 2015

Test MCS Custom API using SoapUI

I'm at the OPN Summercamps 2015 in Lisbon on the Mobile Cloud Services workshop, doning the FixIt Fast tutorial. Now, one of the steps is to test the API imported from a RAML document and confgured it. Then in step 3 you're going to test it using the build in test console of MCS. But since I have SoapUI installed I found it neat to be able to test it from there. Since then you can create Test Suites/Cases to do automatic tests.


What I did was to create a new SOAP UI Rest project based on the endpoint of the API:

Then I added a  paramter named contact with value 'lynn'.
But there are two HTTP-Header properties needed:
Propertyvalue
AuthorizationBasic TUFOVElT...(rest of very long string)
oracle-mobile-backend-id01d3b3a2-7a6b-42c8-b314-d6e8c8f3e898


Both values can be found on the settings tab of the Mobile Backend:
The 'oracle-mobile-backend-id' is found here literally. But the 'Authorization' is found under 'Anonymous Key', where initially it gives a link 'Show'. Clicking it will show a long string. Copy and paste it and prefix it with the word 'Basic' and a single space:

And then you're good to go....

No comments :