Refactor common test steps to a separate module