Initial "automatic" framework for test

This is just a draft. It has basic functionality, and most probably
I will refactor it in the short-term future.
This is Work-In-Progress