The guinea pig (Cavia porcellus) was a small pet animal native to Earth. It was frequently used as a test subject in scientific research, and the term was frequently used to refer to persons similarly subjected to an experiment.
In 2152, when Porthos was treated in sickbay, Jonathan Archer complained to Phlox that he was treating Porthos more like a guinea pig than a valuable companion. (ENT: "A Night in Sickbay")
In 2267, after the colonists on Gamma Hydra IV had been afflicted by rapid aging, Captain Kirk speculated the Romulans had used the colonists as guinea pigs for testing a new weapon. (TOS: "The Deadly Years")
In 2371, the full-Klingon B'Elanna Torres told Sulan that Klingons found honor as warriors on the battlefield, not as guinea pigs in a laboratory. (VOY: "Faces")
In 2372, when Starfleet tested new phaser sweeps to detect changelings on Earth, Odo was used as test subject; after a day of being shot at, he commented if they wanted to do more tests they'd have to search for another guinea pig. (DS9: "Homefront")
In 2373, Captain Janeway remarked to The Doctor she'd be his guinea pig for testing his antigen against the macrovirus. (VOY: "Macrocosm")
In 2374, after Harry Kim and Tom Paris had been copied by the Silver Blood, the mimetic Kim remarked he'd go down to the surface of their planet and let mimetic Paris play guinea pig for The Doctor. (VOY: "Demon")