Creating an Apex Test Class for a Custom Object as a Step
Create the following class to deploy the trigger to your production environment.
If your custom object is the detail record in a master–detail relationship, create a formula field that retrieves OwnerId from the master object. The field's structure depends on how the relationship is named. For example, if your object is related to the account object through a master–detail relationship, the formula is Business_Account__r.OwnerId.
Refer to the Deploy from Sandbox with Change Sets module in Trailhead for instructions on the deployment process.