Make TestFrameworkTest more robust and making sure each test always stop...

...s everything it started.
Having multiple runs of the same program is not the scope of this change.