-1

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

Msp
  • 2,493
  • 2
  • 20
  • 34
  • Do you want to test parse or your application? – Lasse V. Karlsen Jan 27 '16 at 18:58
  • Why would I want to test Parse? – Msp Jan 27 '16 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. – Lasse V. Karlsen Jan 27 '16 at 19:44

2 Answers2

-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.

Mo Nazemi
  • 2,618
  • 2
  • 16
  • 23
-1

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