Instead of waiting to manufacture the entire batch only for Quality Control to find out that something went wrong, companies carry out tests during the actual production. The Production department carries out in-process controls usually as the process is running, but also sends samples to the Quality Control Department which does separate in-process controls for some parameters.
Below are in-process controls typically carried out by the Production department in the various stages.