Go to Jira Administration > Settings> Issues > Workflow and design the workflow.
Here is an example that can be used as a Test & Pre-Conditions Workflow.
Tip
This is just an example! Implement a workflow that is adapted to your own needs.
Recommendations
Have a status for “deprecated” Tests; you can then disallow executions for Tests in this status, in Xray settings.
Have an initial stage for the specification (e.g., “draft” or “new”) and then another status whenever it’s ready to be used
Warning
This does not apply to Next - Gen Projects as the workflow is shared with all issue types and is "integrated" with the board definition.
UI Step
Update the Workflow Scheme
After designing the workflow you need to make it active for your project, you do that by updating the workflow scheme.
Go to your Project > Project settings > Workflows and click "Add Workflow.
Then select the workflow and mapped it with the issue types "Pre-Condition" and " Test"
Don't forget to publish the scheme after updating!
Info
If the workflow is shared you may not be able to add the workflow from the Project Settings and you need to go to the Administration - > Issues - > Workflows Schemes - > [You workflow scheme].
UI Step
Update the Workflow Settings in Xray
Go to Jira Administration > Manage Apps > Xray > Miscellaneous and set the Test workflow Status where you don't want to allow a user to perform Test Executions.
Info
Want to know more about creating and configuring workflows? Check out the Atlassian Documentation.