There is provided a milking system, comprising a device to sample and analyse a milk sample, and that comprises a control unit, a sample supply line connected to the milk line, a pump to control the sample flow, an optical radiation source, and an optical sensor device to detect and analyse optical radiation coming from the reagent pad with said sample, to provide an indication of a substance in said sample, a tape mover to move and unwind the tape from the tape reel, and a pump drive, that is external to the cassette, and that is releasably operably connected to the pump device for driving the pump device. The sampling and analysis device also comprises a cassette with a sample receiving line, releasably connected to the sample supply line by means of a liquid connector, and arranged to receive the sample from the sample supply line, a tape reel with a tape that comprises a base tape layer and a series of separate reagent pads, and a closing device to provide a droplet of the sample onto a reagent pad. The dosing device comprises a nozzle in fluid connection with the sample receiving line, and a nozzle mover arranged to move the nozzle in at least a longitudinal direction. The cassette is replaceably received in the milking system. Hereby, a large number of parts that are subject to wear and contamination by milk residues are exchanged regularly, which improves measurement reliability and accuracy.