You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In principle, generation tests don't need to connect to an actual service, as it only requires the metadata response which could be mocked, making verifying the results more accurate.
I've not done much JS unit testing, there are some good options I'm sure, and it would be valuable, but you'll have to get someone else to answer that question :)
Activity
faniereynders commentedon Jan 29, 2016
You are absolutely right @onionhammer.
In principle, generation tests don't need to connect to an actual service, as it only requires the metadata response which could be mocked, making verifying the results more accurate.
faniereynders commentedon Jan 29, 2016
Unless we really need a set of complete end to end integration tests, if it will add any value
onionhammer commentedon Jan 29, 2016
I've had some success hosting webapis in-proc (started by the test), not that much harder to do, then we actually exercise the httpclient.
faniereynders commentedon Jan 29, 2016
Interesting. @onionhammer care to share an example of how you used it?
onionhammer commentedon Jan 29, 2016
in a base test, you basically instantiate an HttpServer object (new HttpServer(config)).
I can dig up the code, but it's similar to this: http://blogs.msdn.com/b/youssefm/archive/2013/01/28/writing-tests-for-an-asp-net-webapi-service.aspx
faniereynders commentedon Jan 30, 2016
What about testing the JavaScript client?
onionhammer commentedon Jan 30, 2016
I've not done much JS unit testing, there are some good options I'm sure, and it would be valuable, but you'll have to get someone else to answer that question :)