top | item 8836853

(no title)

mlakewood | 11 years ago

I've been thinking of doing something like this for a while. However I want to be able to get datapoints on all the requests going though the proxies so that I can run integration tests on a bunch of distributed systems working together, and then be able to induce failures as well.

The other thing that I think would be great would be to add generative testing to this, to help with testing. Although im not sure how you would model the system, as I havent done much generative testing.

discuss

order

lostcolony|11 years ago

Well, I'm not actually passing anything through proxies. Instead, I'm creating new loopback interfaces, lo:0, lo:1, etc. Presumably any tooling that monitors an interface could be set to watch those (in fact, you can create the interfaces on a machine, and leave them up in between runs, telling Damocles about them using 'register_interface'. That way they stay consistent and can be referenced by other tooling).

You can actually use this to test multiple systems working together as well. This is completely agnostic to what's running on the interfaces. As long as everything can be run on one machine (at least until I find the time to do the work to get it working remotely), you can set up multiple interfaces each of which runs an instance of one app and then another set of interfaces that each run an instance of another app (etc), configure the apps to talk to each other however you like, and then start monkeying with the connections between interfaces using this.

I'm not familiar with generative testing but in general, my goal wasn't to provide a testing framework for distributed systems, but instead a library with higher level primitives that could be used to easily compose pretty complex failure scenarios.

mlakewood|11 years ago

Ahh I see. So all the connecting up of what listens on which interface is done somewhere else. This just created failures at the network level in some scriptable manner. Everything else is up to you.

Makes sense.

What I was thinking about was actually setting up a proxy so you could mess with or record specific requests, and then if all the services in a system were wrapped like that then you would be able to do some really cool integration testing.