On line testing is based on checking quality parameters like Sample drawing properly using suitable approved utensils and Procedure (should not contaminate products).
Checking of temperature of product (for hot filling) with suitable thermometer (not glass as it may contaminate product if broken) etc.
Quality Personnel checking metal detector with metal test pieces and forgetting test pieces in Production area or Production personnel after checking should store test pieces in properly locked cupboard.
Or when carrying out air microbiology of Production area/Swab testing of food contact surfaces proper procedure to be followed .
In line is based on while the product is moving at various stages of processing, filling capping and coding, labelling etc. Instruments like coding M/c should not contaminate products from its ink etc
Nowadays there are lot of computerised testing instruments in line like In-line food Analysers,, in motion check weighing systems,X-ray machines, Color scanning/sorting m/c of product (like potato chips) and their rejections. Checking of PET bottles for defects and their rejections. Package leak detection equipment for testing the integrity of the seal of MAP product. Such instruments should not contaminate the products.
Also all laboratories in house must be separated from production and must have restricted access. Microbiology laboratories must not open directly into Production.