There is provided a milking system, comprising a device (14) to sample and analyse a milk sample, and that comprises a control unit (25), a sample supply line connected to the milk line, a pump to control the sample flow, an optical radiation source (26), and an optical sensor (28) 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 (33) 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 (33) that comprises a base tape layer and a series of separate reagent pads (34), and a dosing device to provide a droplet of the sample onto a reagent pad. The dosing device comprises a nozzle (41) 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.L'invention concerne un système de traite, comprenant un dispositif (14) pour échantillonner et analyser un échantillon de lait, et qui comprend une unité de commande (25), une ligne d'alimentation d'échantillon reliée à la ligne de lait, une pompe pour commander le flux d'échantillon, une source de rayonnement optique (26), et un dispositif de capteur optique (28) pour détecter et analyser un rayonnement optique provenant du tampon de réactif avec ledit échantillon, pour fournir une indication d'une substance dans ledit échantillon,