Pipeline metal detectors work well. Usually they excel in performance compared to using a conveyor style system further downstream due to small aperture and constant flow where both sides of the metal detector coils see the same thing most of the time. The result is very little product effect and very good performance.
The challenge is in determining the correct non-metal inspection pipe that meets the specified temperature and pressure for your application and also confirming the rejection is possible when taking into account the flow rate and reject valve response time. If the flow is too high, or reaction time too short more distance will be needed between the metal detector and reject valve. If the the flow can start and stop intermittently then this should also be considered to ensure the flow persists when a detection occurs at least until the contaminant can be rejected.
Testing can be messy. It is pretty common to see these tested between the pipe and aperture opening. However, inline testing is prudent to ensure detection and rejection. Usually, inline testing is done using a test ball insertion port upstream of the system, and a small catch pipe downstream. If the ball doesn't reject from the valve it will be caught in bars that are oriented across the flow.
I think most users will run inline test initially to determine performance and timing initially then start doing the easier test for most verifications. Reject confirmation should be used and tuned up during the inline test to ensure the valve reaction is always adequate and monitored for every detection event.
I know that Fortress Technology offers a unique feature called Halo which can simulate detection in the center of the aperture and is calibrated to known spherical contaminants. This would a better test then alongside the pipe, and much cleaner than inline.