So I am interest in this functionality as well, but for different reasons. In my Karma Test Suite, I keep a running log of all the ajax requests I test. My backend test suite runs curl requests of endpoints. So in order to keep track that I am fully testing all of my used endpoints, currently I have to manually I take the information from the Karma Test Suite and plug it into the backend test suite. Ideally at the end of the Karma Test Suite I would like to run an actual PUT request to store this information on the server, and have the backend test suite read from it.
On Tuesday, May 14, 2013 4:39:09 PM UTC-4, Josh David Miller wrote: > > @Jacob - The client shouldn't be testing the server *logic* so there > shouldn't be any duplication. A mock server is not a client-side copy of > the server. When you test your code, you need to ensure what the client > SENDS is right, but what it receives in response is not relevant expect in > the context of a test designed specifically for that response; when you > need to test how the client reacts to server-side data, you give it fake > data to ensure it handles it appropriately. In other words, these should be > two separate tests. So in our client-side tests, server-side logic should > be irrelevant. > > In the case that a developer is responsible for both the front and > back-ends, I *strongly* recommend against integrating the tests as it tends > to lead to sloppier work. If we code the backend and the frontend to spec > rather than to each other, we will find it much easier to maintain and to > add new endpoints (e.g. mobile apps) later. > > Josh > > > On Mon, May 13, 2013 at 12:22 PM, Jacob Rief <[email protected]<javascript:> > > wrote: > >> Why not? Often the server-side code depends on the input from an Ajax >> request and vice versa. Web application programmers often write the server- >> AND the client-side code. Its not very DRY to rewrite to server logic in >> Javascript, just to create a mock server. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected]<javascript:> >> . >> Visit this group at http://groups.google.com/group/angular?hl=en-US. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
