3 ms·
Did something like and unlike this a while ago. Payment processing system, multiple microservices written in Java on a cloud platform. Tool runs on a developer
by twic 3y ago
Did something like and unlike this a while ago. Payment processing system, multiple microservices written in Java on a cloud platform. Tool runs on a developer machine, uses the cloud tools to SSH into a running container and run jdb. It can add a breakpoint, wait for it to get hit, then do a selected thing - resume immediately, delay a while then resume, throw an exception, hang forever, etc.
The main tool can also manage the platform, so start the app, kill individual containers, etc. And inject payment messages, and wait for payments to be sent out.
So you could write test plans like "add a breakpoint in ValidateAccount::isValidSortCode, inject a payment from customer A, wait for the breakpoint to get hit, inject a payment from customer B, throw a NullPointerException, then check that the payment from customer B gets delivered".
We didn't do systematic testing of failure at every point, as in the article, but it was very nice to be able to automate testing of error cases without having to have special code in the app for it.