-1

I have an application which uses Cloud Code as backend. Is there any way to write unit tests for Parse Cloud Code?

3
  • Do you want to test parse or your application? Jan 27, 2016 at 18:58
  • Why would I want to test Parse?
    – Msp
    Jan 27, 2016 at 19:43
  • I ask because the normal procedure for testing your code in such a situation is to encapsulate the external dependency behind an interface and then simply mock the interface. You could then construct all kinds of scenarios, such as the call to the cloud system fails with a connection lost exception and what not. Jan 27, 2016 at 19:44

2 Answers 2

-1

Try this:How to use unit tests with parse cloud code

1
  • 1
    Great. Update your answer with this link. I'll accept your answer.
    – Msp
    Jan 28, 2016 at 20:46
-1

You can write various set of cloud functions to perform the tests you want to run. You can then call them via the REST API or execute them in a scheduled background Job.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.