Search code examples
unit-testingibm-mobilefirst

MobileFirst Adapters and Unit Test


IBM MobileFirst offers out of the box the possibility to invoke REST Services by server components written in plain Javascript, so called 'Adapters'. Since my app contains a lot of business logic inside them, I need to test it by Unit Test. Could somebody suggest me a good framework how to create Unit Testing for 'server side' Javascript ? Thanks.


Solution

  • You can write your own tests as mentioned in this post : https://mobilefirstplatform.ibmcloud.com/blog/2016/04/26/MobileFirst-adapters-automatic-testing/ .

    Alternatively swagger UI and Postman can also be used as mentioned here : https://www.ibm.com/support/knowledgecenter/en/SSHS8R_8.0.0/com.ibm.worklight.dev.doc/devref/c_testing_adapters.html