test_actions now use testgen

* tested only first test function, but the principle what it works on is the same.
* I added `VMWrapper` class because I desperately needed to unify interaction with VM to one place.