Have one pilot who is your dedicated Maintenance Test Pilot, or even have more than one, or have a roster so the duties are shared out.
Hardly a difficult problem to solve but that wouldn't maximise profits - until an engineer accidentally gets airborne on a ground run and totals the aircraft - that would be expensive.