[TIP] Functional testing of asynchronous systems

Joseph Heck heckj at mac.com
Sun Nov 14 14:17:21 PST 2010


Hey all,

I've been googling around this weekend, looking for what may already exist out there that (more effectively) support functionally testing of asynchronous systems.

To date, I've been doing hacky/stupid things like embedding "sleep(...)" into my code to wait for a sufficient time to verify completion, but this has all sorts of obvious drawbacks. I've also been mocking in systems with fake interfaces to be able to unit test the logic constructs effectively - with some success. But what I really want to do is functionally test the whole system.

I'd love to take advantage of a unittest like framework with assertions as well as JUnit style XML output so that I can measure/graph the results of the testing over time. My intention is to clean-slate some systems with a nightly build through BuildBot or Hudson and then drive the functional testing from that same system.

Finally, I'd love to enable something like simple webhooks in this testing tool so that if I'm writing the asynchronous systems, I can optionally call back into this thing to register the timing/performance of the system and track that over time as well. Maybe that's just better held completely outside any testing mechanism, but getting a verification.

If folks are doing this kind of thing today, is it always with their own custom code? Any particular libraries of components that help and/or make this easier?

-joe



More information about the testing-in-python mailing list