Could you please elaborate? What code are you referring to?
Is it Pega-specific code? If yes, you can create a Product Rule of your application. A product rule (the Rule-Admin-Product rule) defines the rules and data that comprise your application. You can then export this to the testing environment. The below link talks in depth about it.