views:

48

answers:

1

Is it possible to test private methods of a web service, during api testing? If yes, how to differentiate public methods and private methods? I am using the object browser in VSTS to see the list of methods available.


+1  A: 

When you write private method, it means that this method will be used by public methods of your service. And when you test public methods you automaticly test private methods.

I think you should not test private methods because you should test only bahaviour (API) of library/web service, and it is enough for full coverage of work cases. But may be it will be more difficult for debug.

Also you can read this answer for same question.

One more thread.

Pavel Belousov