Monday, 29 May 2017

Full-stack testing: keeping mock and real responses synced

I tried googling for several hours and could not find an answer to the following question. Is it possible to somehow sync the mock response on the client-side to the specs or a unit test of the real backend module? I have two use cases in mind:

  1. Rails backend with RSpec modules and Angular.js client with ngMock unit tests. Is it possible to somehow test my ngMock response against RSpec or make sure that mocking is identical to the actual server response?

  2. Node.js backend with mocha/jasmine and Angular.js with ngMock.

Alternatively, is it possible to auto-generate stub/mock and feed it to ngMock?



via Andrew

No comments:

Post a Comment