test run logic from main.cpp to unittesting.cpp