[Twisted-Python] automated tests for a server application

Chris Withers chris at simplistix.co.uk
Mon Nov 5 10:07:52 MST 2018


Hi All,

(copying in Moshe as he expressed an interest!)

I've inherited a twisted app for which I'd like to add some changes but 
want to improve the automated test coverage before I do.

The app itself listens on a web socket (autobahn), an rpc port (RPyC) 
and also connects to a mysql database.
So, for the automated tests, I want to check what happens when I send 
various messages to the websocket or rpc port, and then check what ends 
up in the db and what other state changes happen in the app itself.

What's the best/correct way to write automated tests for this kind of 
situation? I'm using pytest and would happily use pytest-twisted too. 
Not keen to use trial...

Any help is good help, pointers to nice existing examples would be 
fantastic!

cheers,

Chris



More information about the Twisted-Python mailing list