The invention relates to a testing system and related methods for detecting peritonitis or infection in peritoneal dialysate removed from a patient. The testing system can include a fluid sensor apparatus in a fluid line of a peritoneal dialysis cycler through which spent peritoneal dialysate can be pumped. The fluid sensor apparatus can detect one or more markers associated with peritonitis or infection.