integrate test-runner and add --test switch