I think that is one of the good points. If I test an interface of sending an request and getting a response I'm not interested in network stuff. I want to test my software and not my network stack. And I like to force errornous behavior in order to test error handling of my software. Finally I want to habe reliable tests which is hard to achieve if you allocate system resources. That means I don't want to randomly shuffle port numbers and hope it doesn't clash if tests are executed in parallel. It is just that mocks are hard to apply. Norbert
Am 02.03.2016 um 22:15 schrieb Chris Muller <ma.chris.m@gmail.com>:
I assume the mock object does not exercise any real network code or primitives.
On Wed, Mar 2, 2016 at 2:43 PM, Norbert Hartl <norbert@hartl.name> wrote:
Am 02.03.2016 um 17:27 schrieb Chris Muller <asqueaker@gmail.com>:
A mock network will never test as thoroughly as locahost network.. Why? Please elaborate!
Norbert
On Wed, Mar 2, 2016 at 6:32 AM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote: HI, there is one thing in Ruby (on Rails) that I really like and it is a option to mock network. This means that when you run a test your network requests are handled by a mock object and you can tell it that for this URI it should give you this response. This is helpful if you donât want to rely on a network availability or test certain corner cases.
Is there anything like this in Pharo?
Uko