Extract notify_test_status to lib directory