Refactor tests launching procedure