[Twisted-Python] Autobahn WebSockets 0.4.3

Corbin Simpson mostawesomedude at gmail.com
Mon Oct 31 17:32:03 MDT 2011


On Mon, Oct 31, 2011 at 3:25 PM, Tobias Oberstein
<tobias.oberstein at tavendo.de> wrote:
> You can use Autobahn to test Autobahn of course.
>
> Autobahn's test approach is tailored towards it's domain (communication
> protocols) and based on the following perspective:
>
> If you have a black box, that behaves to a protocol spec regarding
> all it's externally visible behavior, you can call that black box conforming
> to the protocol.
>
> Whether you then have unit tests for stuff that happens within the black
> box is less relevant, as long as you have covered all the spec with
> behavioral test cases.
>
> When you only have unit tests for stuff happening inside the box,
> you still can't say if the box conforms to the spec. It may pass all
> unit tests and fail when talking to the world.
>
> For protocols, the reason for this is: any unit test by definition
> misses an essential part: the peer you communicate with.
>
> As an example, instead of writing a unit test that checks whether
> a UTF-8 decoding function raises upon invalid sequences,
> execute a fuzzing test case where the fuzzer will actually send
> the tested implementation invalid UTF-8 and check the externally
> visible behavior.

Okay. This seems reasonable. I really only have two reasons for doing
unit tests on top of this, and both are kinda orthogonal: Isolation
and specificity. Clearly, I need to do less TDD.

Anyway, I'm running the fuzzer against txWS, and things appear to be
working. Thanks for a useful tool!

-- 
When the facts change, I change my mind. What do you do, sir? ~ Keynes

Corbin Simpson
<MostAwesomeDude at gmail.com>




More information about the Twisted-Python mailing list